Best method to code bulk emails
Hi. I’m interested to find out if anyone else has written some frequently used code that generates at least 100,000 personalised emails at a time? e.g. a mailing list. Have you done anything in particular to optimise the process such as sharing the work between multiple servers or splitting the task into multiple smaller threads?
All of the recipients are in a query and I’m using <cfmail query=”#query#”> to loop through it. There are several cfif/cfelse parts to provide some personalisation based on what’s already in the query.
- Slow to generate 100K+ emails (it’s single threaded)
- Have to use <cfsetting requestTimeout=”1 hour”> to remove risk of timeout
- If an error is thrown then all remaining emails fail to generate (no damage limitation or recovery)
Have you found a better way to generate emails internally for sending to external subscribers/customers?
The final issue is to do with the recipients’ email providers who periodically mistake genuinely requested email for spam. Obviously that’s not a CF issue but one many developers encounter. Has anyone implemented DMARC and noticed an improvement in emails getting through to inboxes?