Tests working, now let's scale it up

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
michiel
Forum Newbie
Posts: 3
Joined: Tue Feb 05, 2008 8:27 am

Tests working, now let's scale it up

Post by michiel »

Hi,

I'm currently writing a basic newsletter mailer with Swift. I have everything working in a test environment, with just a bunch of e-mail addresses. This all works flawlessly.

Now in the actual application I will be sending to around 2000 e-mail addresses. Though I understand the basics are the same, I have a few questions about the implications of scaling it up:

- How long will it take to send a newsletter to 2000 addresses? Should I change my PHP-execution time, or will the defaults be sufficient?

- Is it necessary to create batches from the database myself and pausing between them myself? Or is this an acceptable number to be handled in one go?

- Any tips for best practices here?

Off course I'd like my application to work right on, as there isn't much room for testing it, using peoples real addresses :)

Thanks in advance for any tips!

Cheers, Michiel
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Tests working, now let's scale it up

Post by Chris Corbyn »

2000 is too many in one go but there are plugins to help with this. The AntiFlood plugin can be used to do them at 100 emails per connection. This is a very commonly asked question so I'll just refer to a recent thread ;)

* no more than 100 in a single connection!
** 2000 should take maybe 5-10 minutes depending on your network, you'll definitely need to change PHP's default time limit of 30 seconds (you can use set_time_limit($number_of_seconds)

viewtopic.php?f=52&t=78443
Post Reply