From 249c9aef35618f620382dc9ce50d811706ccd82f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 17 Aug 2014 15:06:28 -0700 Subject: Add secure connection TLS/SSL for the SMTP transport --- app/common.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/common.php') diff --git a/app/common.php b/app/common.php index 9d48442b..f92e3ddb 100644 --- a/app/common.php +++ b/app/common.php @@ -91,6 +91,7 @@ defined('MAIL_SMTP_HOSTNAME') or define('MAIL_SMTP_HOSTNAME', ''); defined('MAIL_SMTP_PORT') or define('MAIL_SMTP_PORT', 25); defined('MAIL_SMTP_USERNAME') or define('MAIL_SMTP_USERNAME', ''); defined('MAIL_SMTP_PASSWORD') or define('MAIL_SMTP_PASSWORD', ''); +defined('MAIL_SMTP_ENCRYPTION') or define('MAIL_SMTP_ENCRYPTION', null); defined('MAIL_SENDMAIL_COMMAND') or define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs'); $loader = new Loader; @@ -166,6 +167,7 @@ $registry->mailer = function() use ($registry) { $transport = Swift_SmtpTransport::newInstance(MAIL_SMTP_HOSTNAME, MAIL_SMTP_PORT); $transport->setUsername(MAIL_SMTP_USERNAME); $transport->setPassword(MAIL_SMTP_PASSWORD); + $transport->setEncryption(MAIL_SMTP_ENCRYPTION); break; case 'sendmail': $transport = Swift_SendmailTransport::newInstance(MAIL_SENDMAIL_COMMAND); -- cgit v1.2.3