- Implements return path for SMTP/PHPMail/AmazonSES
This commit is contained in:
@@ -14,11 +14,12 @@ class SMTP {
|
||||
public $encryption;
|
||||
public $sender;
|
||||
public $reply_to;
|
||||
public $return_path;
|
||||
public $mailer;
|
||||
|
||||
function __construct(
|
||||
$host, $port, $authentication, $login = null, $password = null, $encryption,
|
||||
$sender, $reply_to) {
|
||||
$sender, $reply_to, $return_path) {
|
||||
$this->host = $host;
|
||||
$this->port = $port;
|
||||
$this->authentication = $authentication;
|
||||
@@ -27,6 +28,9 @@ class SMTP {
|
||||
$this->encryption = $encryption;
|
||||
$this->sender = $sender;
|
||||
$this->reply_to = $reply_to;
|
||||
$this->return_path = ($return_path) ?
|
||||
$return_path :
|
||||
$this->sender['from_email'];
|
||||
$this->mailer = $this->buildMailer();
|
||||
}
|
||||
|
||||
@@ -65,6 +69,7 @@ class SMTP {
|
||||
->setReplyTo(array(
|
||||
$this->reply_to['reply_to_email'] => $this->reply_to['reply_to_name']
|
||||
))
|
||||
->setReturnPath($this->return_path)
|
||||
->setSubject($newsletter['subject']);
|
||||
if(!empty($newsletter['body']['html'])) {
|
||||
$message = $message->setBody($newsletter['body']['html'], 'text/html');
|
||||
|
Reference in New Issue
Block a user