Skip to content

Commit

Permalink
Added support for smtp ssl / tls connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Caffe1neAdd1ct committed Sep 16, 2015
1 parent af5c336 commit 6f5a214
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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()
{
Expand All @@ -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);
Expand Down

0 comments on commit 6f5a214

Please sign in to comment.