TheUnreal Posted October 1, 2013 Share Posted October 1, 2013 Hello. My site has about 15k registered users and I want to send mass mail to all who were inactive for more than a week. I know how to check if they were online for more than a week, but the problem is how I'm going to send 15k emails without the server to crash? How I can do it smart without wasting too much resources for 15k emails (that some of them are fake) Quote Link to comment https://forums.phpfreaks.com/topic/282602-php-mass-emailer/ Share on other sites More sharing options...
Ch0cu3r Posted October 1, 2013 Share Posted October 1, 2013 I think how some websites send out mass emails is to send them in batches, like 500 emails at a time. The email script will then pause a minute, then send the next batch of 500. This is most probably handled with a scheduled task/cron job. Doing this should reduce the load on the server. Quote Link to comment https://forums.phpfreaks.com/topic/282602-php-mass-emailer/#findComment-1452024 Share on other sites More sharing options...
davidannis Posted October 1, 2013 Share Posted October 1, 2013 You should be able to use http://pear.php.net/package/Mail_Queue/ The Mail_Queue class puts mails in a temporary container, waiting to be fed to the MTA (Mail Transport Agent), and sends them later (e.g. a certain amount of mails every few minutes) by crontab or in other way. Quote Link to comment https://forums.phpfreaks.com/topic/282602-php-mass-emailer/#findComment-1452068 Share on other sites More sharing options...
vinny42 Posted October 1, 2013 Share Posted October 1, 2013 You are not going to crash the server by sending 15k emails because you can only queue them and when the queue get's too full, it will simply tell you to calm down and wait for it to catch up. There are however much more important things to worry about, like how the mailserver sees this sudden avalange of email. most likely it wil decide that you have been hacked and block you, or owrse, decide that you are spamming and block you worldwide. Talk to your hoster or google for a massmailing service to do the work for you (they know how to send emails properly) Quote Link to comment https://forums.phpfreaks.com/topic/282602-php-mass-emailer/#findComment-1452070 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.