Staggered/Queued Mail Sending?
Posted: Fri Apr 25, 2008 3:57 am
Hi guys,
Currently with my system, I click my 'send' button, and my system/Swift process/send 500+ emails on the spot. It involves decorator etc, so each email is customised for the specific recipient.
My system does this with a few different types of emails.
I've spent the last few days modifying the system slightly so that instead of sending them all on the spot, I instead log 'jobs' into a database table, and a CRON job comes along and sends a 'block' of emails as a batch process.. This is to a) ensure only x amount of emails get sent per hour inline with ISP's requirements. b) to remove some of the 'nail-biting' factor we currently get when relying on a single post/browser/server connection to not 'crash' or something
But I've just run into a bit of a brick wall, as i realised I've approached it sort of wrongly.
So my question is this. Is there a way I can use my current process, and have swift 'generate' all the emails etc, put in the pretty pictures, customisation etc, and do everything up until the point of 'SEND', but instead of sending the actual email, STORE the finished/ready-to-go product in the database, which the cron job could then just 'send' later on? Does that make sense? Any feedback would be greatly appreciated
Cheers,
EoN
Currently with my system, I click my 'send' button, and my system/Swift process/send 500+ emails on the spot. It involves decorator etc, so each email is customised for the specific recipient.
My system does this with a few different types of emails.
I've spent the last few days modifying the system slightly so that instead of sending them all on the spot, I instead log 'jobs' into a database table, and a CRON job comes along and sends a 'block' of emails as a batch process.. This is to a) ensure only x amount of emails get sent per hour inline with ISP's requirements. b) to remove some of the 'nail-biting' factor we currently get when relying on a single post/browser/server connection to not 'crash' or something
But I've just run into a bit of a brick wall, as i realised I've approached it sort of wrongly.
So my question is this. Is there a way I can use my current process, and have swift 'generate' all the emails etc, put in the pretty pictures, customisation etc, and do everything up until the point of 'SEND', but instead of sending the actual email, STORE the finished/ready-to-go product in the database, which the cron job could then just 'send' later on? Does that make sense? Any feedback would be greatly appreciated
Cheers,
EoN