Add default notification email
[MAILPOET-1522]
This commit is contained in:
@@ -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
|
||||
|
@@ -68,6 +68,9 @@ class SendNewSubscriberNotification {
|
||||
if(!isset($settings['address'])) {
|
||||
return true;
|
||||
}
|
||||
if(empty(trim($settings['address']))) {
|
||||
return true;
|
||||
}
|
||||
return !(bool)$settings['enabled'];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user