Page tree

Usually translate5 uses the standard mail server, that is configured via php.ini, which usually goes through sendmail on Linux.

Yet it is possible to configure any mail server to use for a certain translate5 installation through SMTP in translate5's installation.ini.

To do so you can use a configuration like this:

;;
;; Mandatory default sender email address and name
;;
resources.mail.defaultFrom.email = MAILADDRESS            ; this is the address that is the sender of the email, should be something like service@translationcompany.com 
resources.mail.defaultFrom.name = "Translation Company"   ; this is the from name for the email and should be changed to a speakable name

;;
;; SMTP Server Example
;; If there is no local mail server configured, mail sending can optionally be configured to use a third party mail server:
;;
resources.mail.transport.type = Zend_Mail_Transport_Smtp  ;In order to use a separate SMTP server the transport type must be set to this value
resources.mail.transport.host = SMTPSERVER                ;this should be the hostname of your smtp server, that should send the mail
resources.mail.transport.name = LOCALSERVERNAME           ;this should be the domain name of the server, that runs translate5 (used for HELO)

;;
;; Optional, additional SMTP Configuration flags
;;

; E-Mail transport security 
resources.mail.transport.ssl = tls | ssl                  ;choose between tls or ssl → with ssl the port 465 is used automatically
; SMTP Server authentication 
resources.mail.transport.auth = login | plain | crammd5   ; If authentication is needed for above configure mail server, choose the correct authtype here
resources.mail.transport.username = USERNAME              ; SMTP server credentials
resources.mail.transport.password = PASSWORD

;;
;; Additional hints for Sendmail usage (default, local e-mail delivery)
;;
resources.mail.transport.type = Zend_Mail_Transport_Sendmail     ; when setting additional parameters, the type must be set explicitly to Sendmail
resources.mail.transport.parameter = '-rsupport@translate5.net'  ; a different sender (from) can be set via parameter

;;
;; Disable E-Mail dispatching
;; in order to disable the e-mail dispatching at all, just add the following optional line to your config. No other mail transport configuration is needed then.
runtimeOptions.sendMailDisabled = 1 

In general you can use any kind of further configuration Zend_Mail of Zend Framework 1 allows. For a number of examples please have a look here.

To send every mail the server sends as bcc to certain addresses you can add the following lines

runtimeOptions.mail.generalBcc[] = support@translationcompany.com
runtimeOptions.mail.generalBcc[] = support2@translationcompany.com

How to configure translate5 to only send error mails to certain addresses (or to only send errors of certain log levels) please read here.


TLS Problems

When using a SMTP server with TLS and receiving TLS problems on mail sending, it could be a problem with the TLS encryption.

To test the connection in translate5:

Use t5 system:mailcheck

To test a raw TLS connection (with gmail server as example):

openssl s_client -connect smtp.gmail.com:25 -starttls smtp

depending on the linux system the path to the systems CAs may be necessary:

openssl s_client -connect smtp.gmail.com:25 -starttls smtp -CApath /etc/ssl/certs 

Connection with error example:

Sources:

  • No labels