PaulB
Well-known member
- Affected version
- 2.2.6 Patch 2
Currently, email queue processing works roughly like this:
Note for people still on XF1: A similar bug exists there, but instead of the entry staying in the queue, it will be deleted.
- Mark entry as being processed by setting
send_date
15 minutes into the future.- If marking failed, it's already being processed; skip this item.
- Deserialize
mail_data
.- If deserialization failed or is not an instance of
Swift_Mime_SimpleMessage
, skip this item without further changes.
- If deserialization failed or is not an instance of
- Attempt to send the email.
- If send failed,
Mailer
is expected to call the queue'squeueForRetry
method. - If send succeeds, delete the mail item from the queue.
- If send failed,
mail_data
doesn't contain what the code expects, it silently fails, and the entry stays in the queue. No exception is logged and the mail stays where it is. Furthermore, fail_date and fail_count aren't touched. This can result in a situation whereby the environment or third-party code causes a hard-to-debug failure that prevents queued mail from being delivered and allows the mail queue to grow unchecked.Note for people still on XF1: A similar bug exists there, but instead of the entry staying in the queue, it will be deleted.