diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index f46dd452d2..1915b0012c 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -173,7 +173,11 @@ class Populator { $subscriber_email_notification = Setting::getValue(SendNewSubscriberNotification::SETTINGS_KEY); if(empty($subscriber_email_notification)) { - Setting::setValue('subscriber_email_notification', ['enabled' => true]); + $sender = Setting::getValue('sender', []); + Setting::setValue('subscriber_email_notification', [ + 'enabled' => true, + 'address' => isset($sender['address'])? $sender['address'] : null, + ]); } // reset mailer log diff --git a/lib/Subscribers/SendNewSubscriberNotification.php b/lib/Subscribers/SendNewSubscriberNotification.php index b98acaff6c..ef49b1c760 100644 --- a/lib/Subscribers/SendNewSubscriberNotification.php +++ b/lib/Subscribers/SendNewSubscriberNotification.php @@ -68,6 +68,9 @@ class SendNewSubscriberNotification { if(!isset($settings['address'])) { return true; } + if(empty(trim($settings['address']))) { + return true; + } return !(bool)$settings['enabled']; }