From 6f5a214b220fd4d47ec203a7ed6be858d72d258d Mon Sep 17 00:00:00 2001 From: Kevin Andrews Date: Wed, 16 Sep 2015 12:23:53 +0100 Subject: [PATCH] Added support for smtp ssl / tls connections. --- inc/mailer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/mailer.php b/inc/mailer.php index 8353223..a59a575 100644 --- a/inc/mailer.php +++ b/inc/mailer.php @@ -28,6 +28,7 @@ class mailer private $emailConfigPass = 'email-account-password'; private $emailConfigHost = 'localhost'; private $emailConfigPort = 25; + private $emailConfigSsl = false; private $emailTo = 'to@domain.com'; private $emailToName = 'our support team'; @@ -36,7 +37,6 @@ class mailer private $emailBody = null; private $emailReplyTo = null; - private $smtpMail; private $smtpTransport; @@ -44,6 +44,7 @@ class mailer const CONFIG_USER = 'username'; const CONFIG_PASS = 'password'; const CONFIG_PORT = 'port'; + const CONFIG_SSL = 'ssl'; public function __construct() { @@ -52,6 +53,7 @@ public function __construct() self::CONFIG_USER => $this->emailConfigUser, self::CONFIG_PASS => $this->emailConfigPass, self::CONFIG_PORT => $this->emailConfigPort, + self::CONFIG_SSL => $this->emailConfigSsl, ); $this->smtpTransport = new Zend_Mail_Transport_Smtp($this->emailConfigHost, $config);