If there's a bad 'To' field email create die but it isn't caught by SendQueuedMessages.
Created attachment 125238 [details] [review] Bug 28996: Catch error in mail creation
Created attachment 125250 [details] [review] Bug 28996: Catch error in mail creation
+1 giga
*** This bug has been marked as a duplicate of bug 28803 ***
Looks like a duplicate of bug 28803. Please reopen if I am wrong.
It looks like bug 28803 only covers part of the root problem. C4::Letters::SendAlerts still has the problem. I'll rename the bug title to be more accurate.
The patch will need to be rewriten to take into account bug 28803 but should be an easy fix overall. (I've applied the fix locally for years. At some point this year I might find the time to upstream it.)