I'm in the process of upgrading an old document management system. Part of the existing functionality sends emails to some or all users when certain events happen to documents on the system.
Currently, the code generates an inordinate number of emails in response to these events which it then despatches using PHP's mail() function while the user sits and waits...
...and sometimes waits, and waits and... you get the picture.
I'm looking for some sort of library that will:
- queue these emails quickly somehow
- despatches them over time using some sort of background script driven by
cron
or another scheduler. - is able to throttle outbound mail and 'jump the queue' for urgent mail.
- MySQL storage would be good, other non-database solutions might work
- It would be great if it has some sort of delivery failure processing, but this is not essential.
- Free would be very nice
I've used PHPMailer - no background processing - and SwiftMail - same problem AFAIK.
mail()
function, you could place the "ready-to-deliver".msg
files directly into the spool directory, and have the management done by the MTA. Some of them support this, I've once done things this way. But OK, I see this might not be an option here. – Izzy♦ Nov 25 '14 at 14:37