mantisbt/mantisbt — pull request #195 by grangeway (2014-05-27 08:51:14+00:00)
Title: Fix: Email processing occurs in the wrong order.

The purpose of the email queue is to allow batch processing emails to speed up web page response.

Our aim should be to ensure the email table is as close to empty at all times,
(if cron jobs are not used, we try to clear the table at the end of the web page request)

Therefore:

a) There's no need to define a custom sort order for the table. In the ideal world, where the table is empty, the sort order is going to be irrelevant

b) Emails should be sent in the order they are generated. Therefore, they should always be processed in ASCending order.

After this, I plan on looking at how we handle emails that previously errored to ensure that users are notified of problems in some way, and we avoid performance issues, as email troubleshooting is one of our more popular support issues with end users