From 3622bc9fcbea53fd0afc8dd9021e42d3828c7e67 Mon Sep 17 00:00:00 2001 From: Jonathan Labreuille Date: Fri, 26 Feb 2016 11:41:22 +0100 Subject: [PATCH] fixed sending issue of confirmation email --- lib/Models/Subscriber.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/Models/Subscriber.php b/lib/Models/Subscriber.php index 77a01cb58e..7cd3161dd3 100644 --- a/lib/Models/Subscriber.php +++ b/lib/Models/Subscriber.php @@ -139,16 +139,19 @@ class Subscriber extends Model { $subscriber = $this->asArray(); // set from - $from = (!empty($signup_confirmation['from']) - ? $signup_confirmation['from'] - : false - ); + $from = ( + !empty($signup_confirmation['from']) + && !empty($signup_confirmation['email']) + ) ? $signup_confirmation['from'] + : false; // set reply to - $reply_to = (!empty($signup_confirmation['reply_to']) - ? $signup_confirmation['reply_to'] - : false - ); + $reply_to = ( + !empty($signup_confirmation['reply_to']) + && !empty($signup_confirmation['reply_to']) + ) ? $signup_confirmation['reply_to'] + : false; + // send email $mailer = new Mailer( @@ -156,10 +159,6 @@ class Subscriber extends Model { $from, $reply_to ); - print '
';
-      print_r($mailer);
-      print '
'; - exit(); return $mailer->send($email, $subscriber); } return false;