Page 1 of 1
best way to send newsletter
Posted: Mon Feb 04, 2008 9:27 am
by yacahuma
Hello,
WHat is the best way to send a newletter for 4000 emails
1. get all the mail in one select and use batch send
or
2. use limit to get X number of records and run the cron every 5 minutes
Are there better options?
Thank you
Re: best way to send newsletter
Posted: Mon Feb 04, 2008 7:55 pm
by Chris Corbyn
Anything over 100 emails, Cron. This has been asked many times before

Re: best way to send newsletter
Posted: Tue Feb 05, 2008 3:29 am
by yacahuma
Both are in a cron. What I am saying is if I should use a select limit or let swiftmailer get all of them at once?
I guess you are saying use the limit?
Re: best way to send newsletter
Posted: Tue Feb 05, 2008 3:31 am
by Chris Corbyn
Ah I see. Definitely limit the number of emails in any single batch yes. You'll scale far better if you apply limits.
Re: best way to send newsletter
Posted: Tue Feb 05, 2008 5:33 am
by yacahuma
what about the Throttler Plugin? Why not load the 3000 mails and then use this plug in? Pros and Cons?
Re: best way to send newsletter
Posted: Tue Feb 05, 2008 5:52 am
by Chris Corbyn
yacahuma wrote:what about the Throttler Plugin? Why not load the 3000 mails and then use this plug in? Pros and Cons?
Well, the throttler in combination with the anti-flood plugin will work (or even just anti-flood alone).
Pro's: It's simple to write and manage.
Con's: The load caused by the script may be high. If the script dies, your entire batch does. A cron would get a second (read, multiple) chances.
Don't get me wrong. AntiFlood and Throttler were developed for that exact reason, but I'm an honest guy and I have to admit that I'd personally choose cron over my own plugins

The plugins are solid though (those particular ones have never had any problems). It's a matter of preference I guess.
PHP (not swift) is known to leak memory too when it's run for a long time unfortunately.
Re: best way to send newsletter
Posted: Tue Feb 05, 2008 6:13 am
by yacahuma
Thank a lot. I will go with the limit route and run the cron every 5 minutes.
Maybe load 500 mails per batch.
Re: best way to send newsletter
Posted: Tue Feb 05, 2008 6:17 am
by Chris Corbyn
I think that's reasonable

Though I'd double that with the anti-flood plugin to restart the connection at each 100 emails (since 100 is often a limit-per-connection).