Info |
---|
For MicroSoft OAuth2 routing configuring see Installation specific options: Use MicroSoft OAuth2 routing to send mail |
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 SMTP in translate5's installation.ini.
To do so you can use a configuration like this:
Code Block | ||
---|---|---|
| ||
;; ;; Mandatory default sender email address and name ;; resources.mail.defaultFrom.email = service@translationcompany.com 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 justthe hte 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 ;thisIn order isto theuse maila transportseparate typeSMTP forserver the Zend_Mailtransport classtype andmust shouldbe stayset asto it is for smtpthis value resources.mail.transport.host = your.smtphost.com SMTPSERVER ;this should be the hostname of your smtp server, that should send the mail resources.mail.transport.name = translate5.translationcompany.com 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
...
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