Commit 628ad686 authored by Stephen Shkardoon's avatar Stephen Shkardoon

Merge pull request #57 from ss23/fix_broken_stop

FIX Prevent failing emails stopping entire queue
parents 892b34ed 4cef368d
......@@ -214,7 +214,12 @@ class NewsletterSendController extends BuildTask {
//send out the mails
foreach($queueItems2 as $item) {
$item->send($newsletter, $recipientsMap[$item->RecipientID]);
try {
$item->send($newsletter, $recipientsMap[$item->RecipientID]);
} catch (Exception $e) {
$item->Status = 'Failed';
$item->write();
}
}
}
......@@ -233,4 +238,4 @@ class NewsletterSendController extends BuildTask {
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment