Remove uneeded variables
[MAILPOET-2328]
This commit is contained in:
committed by
Jack Kitterhing
parent
673423b709
commit
4c57e59c74
@@ -90,20 +90,12 @@ class ConfirmationEmailMailer {
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
// set from
|
|
||||||
$from = $this->settings->get('sender', false);
|
|
||||||
if (empty($from['address'])) $from = false;
|
|
||||||
|
|
||||||
// set reply to
|
|
||||||
$reply_to = $this->settings->get('reply_to', false);
|
|
||||||
if (empty($reply_to['address'])) $reply_to = false;
|
|
||||||
|
|
||||||
// send email
|
// send email
|
||||||
try {
|
try {
|
||||||
if (!$this->mailer) {
|
if (!$this->mailer) {
|
||||||
$this->mailer = new Mailer();
|
$this->mailer = new Mailer();
|
||||||
}
|
}
|
||||||
$this->mailer->init(false, $from, $reply_to);
|
$this->mailer->init();
|
||||||
$result = $this->mailer->send($email, $subscriber);
|
$result = $this->mailer->send($email, $subscriber);
|
||||||
if ($result['response'] === false) {
|
if ($result['response'] === false) {
|
||||||
$subscriber->setError(__('Something went wrong with your subscription. Please contact the website owner.', 'mailpoet'));
|
$subscriber->setError(__('Something went wrong with your subscription. Please contact the website owner.', 'mailpoet'));
|
||||||
|
Reference in New Issue
Block a user