Sending mails

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Majid
Forum Newbie
Posts: 1
Joined: Fri Apr 13, 2007 2:57 am

Sending mails

Post by Majid »

Hi,

I have a site with more than 50,000 user and I want to send newsletters to each of our site user.

If I use the normal "mail" command in PHP, it will create a heavy load for the server so that after sending the email, because of the heavy traffic which gets created on the server, the email will either not be send or it can take up to one week till it gets send out.

Is there any better and easier procedure or method for sending these types of emails? (I have a dedicated server)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

First things first. 50,000 emails is too many to send in one go. You'll have to batch them into smaller groups and handle it by cron or something.

As for keeping the load down Use SMTP to spread over two (or more) servers:

http://www.swiftmailer.org/
http://www.swiftmailer.org/wikidocs/v3/connections/smtp
http://www.swiftmailer.org/wikidocs/v3/ ... ns/rotator
http://www.swiftmailer.org/wikidocs/v3/ ... /throttler
Post Reply