Fix email

This commit is contained in:
Thomas Zilio 2019-09-06 17:40:02 +02:00
parent 3f1fccdf15
commit f126ff891e
2 changed files with 3 additions and 3 deletions

View File

@ -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');

View File

@ -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