Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Mass Mailing with fSMTP and fEmail

posted by ihumanable 9 years ago

I've written a mass mailer using the fSMTP and fEmail classes and am getting acceptable performance (around 500 emails / minute). The problem that I'm running into is that even though the emails are being generated quickly enough people aren't receiving them until hours later.

My initial thought was that if you try to send out 70,000 emails using one SMTP server at 500 emails / minute that the server just gets them all queued up and it just takes time for it to process them all. I still think this is correct I just wanted to get some community feedback and eliminate Flourish as any source of problem.

I would hate to have to dirty up my code using !SwiftMailer or some other mass mail lib, Flourish code is just so nice and clean and consistent.

From my experience when we use to run some mass mailing stuff on some of our servers, sending 70,000 emails can easily take 4+ hours. I think if you need the messages delivered faster, you will probably need to use multiple SMTP servers, or perhaps some dedicated SMTP service that focuses on speed.

The only performance part that would be affected by the PHP side is how fast the emails get sent to the SMTP server. I have not profiled the performance of fSMTP at all, so there may be ways to improve it. I did, however, implement the SMTP PIPELINING extension, which allows sending a bunch of info without waiting for confirmation for each before continuing.

Right now fEmail and fSMTP do not try to send emails with the 8BITMIME extension in the interest of compatibility. Theoretically messages sent via 8BITMIME would be faster since the size of the messages would be smaller due to a more efficient encoding.

posted by wbond 9 years ago