views:

377

answers:

2

I want to develop a mailing list application that needs to be able to handle out sending messages to 50,000-100,000 subscribers at a time.

Can Swiftmailer's batch send method handle this? I am a simpleton when it comes to email/SMTP/mail servers--what are other things I need to keep in mind when developing this application?

+2  A: 

Whilst I'm normally a big fan of Swiftmailer, I wouldn't necessarily recommend it for lists that large. I have a site which has been sending out member notifications of that magnitude for over a year now using PEAR Mail and Mail_Queue without any issues.

Essentially, the messages get queued for delivery (stored as records in a MySQL database) and then a cron job runs periodically throughout the night to send them in manageable batches (using php CLI).

(answering 2nd part of original question, since moved here) As for tracking:

  • I have no idea about bounces.
  • I believe the only way to track "opens" is to include an image file (within the email) from a server which you can then track requests for. I have no experience of this method, but have heard it's unreliable - plus there's the ethical questions it raises...
  • Probably the easiest way to track clicks would be to run them through your own server before redirecting to the URL in question. Again, ethics...
da5id
+3  A: 

I've written a mail app or three in my days. Can't really comment on swiftmailer at all, but some things to keep in mind:

1) Lists of this scale are long-running operations. So long-running that they really should not be handled by web processes at all but rather as some sort of batch job.

2) Something sometime is going to screw up and cut off the stream of stuff to send. Which means your mailer app should be able to a) know what it is doing and b) be able to restart itself at any point.

3) Related to #2--have lots of instrumentation and logging on this puppy. You will need to be able to figure out when this long-running batch process screwed up and why at some point.

So, basically, the key thing to focus on is making the batch job bits work. Exactly what email sending engine is almost a secondary concern.

Wyatt Barnett
+1 from me. Great advice, well written.
duffymo