-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for smtp ssl / tls connections.
- Loading branch information
1 parent
af5c336
commit 6f5a214
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ class mailer | |
private $emailConfigPass = 'email-account-password'; | ||
private $emailConfigHost = 'localhost'; | ||
private $emailConfigPort = 25; | ||
private $emailConfigSsl = false; | ||
|
||
private $emailTo = '[email protected]'; | ||
private $emailToName = 'our support team'; | ||
|
@@ -36,14 +37,14 @@ class mailer | |
private $emailBody = null; | ||
private $emailReplyTo = null; | ||
|
||
|
||
private $smtpMail; | ||
private $smtpTransport; | ||
|
||
const CONFIG_AUTH = 'auth'; | ||
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); | ||
|