diff --git a/modules/emails/src/EmailHook.php b/modules/emails/src/EmailHook.php index 6478a5049..d972d5767 100644 --- a/modules/emails/src/EmailHook.php +++ b/modules/emails/src/EmailHook.php @@ -15,7 +15,7 @@ class EmailHook extends Manager public function needsExecution() { - $diff = date('Y-m-d', strtotime('-4 hours')); + $diff = date('Y-m-d H:i:s', strtotime('-4 hours')); $failed = function ($query) use ($diff) { $query->whereDate('failed_at', '<', $diff) ->orWhereNull('failed_at'); @@ -30,7 +30,7 @@ class EmailHook extends Manager public function execute() { - $diff = date('Y-m-d', strtotime('-4 hours')); + $diff = date('Y-m-d H:i:s', strtotime('-4 hours')); $failed = function ($query) use ($diff) { $query->whereDate('failed_at', '<', $diff) ->orWhereNull('failed_at'); diff --git a/src/Notifications/EmailNotification.php b/src/Notifications/EmailNotification.php index f1a45c3fe..6726e2a1d 100644 --- a/src/Notifications/EmailNotification.php +++ b/src/Notifications/EmailNotification.php @@ -93,7 +93,7 @@ class EmailNotification extends PHPMailer implements NotificationInterface // Destinatari $receivers = $mail->receivers; foreach ($receivers as $receiver) { - $this->addReceiver($receiver['email'], $receiver['type']); + $this->addReceiver($receiver['address'], $receiver['type']); } // Allegati