I am preparing a site that will send email notifications to registered users. In my experience, I know that sending emails is a bit of a painful process for PHP, especially when we talk about thousands. One of my websites emails from time to time to 1000-1500 people. It takes about 5 minutes for PHP to do this, so we run it overnight when the server load is the lowest. I use the built-in mail() function without SMTP. This works fine on a dedicated server, but I am not a big fan of this solution.
I want to be able to send such amounts at any time, without risking going down to the server (and it will be blacklisted).
I read that the ideal solution is to send letters in batches (say, 20) every couple of minutes with a script that runs Cron. This seems like a really reasonable idea to me, but ... What if I donโt have access to Cron (not all hosting providers provide access to it) and the website is not popular enough to run the script on the download page?
I insist on using my server for mailing, and not for any external solution.
PS. I found such solutions: http://www.mywebcron.com/ , but is this good?
EDIT
Just add:
- I am using CodeIgniter,
- the rate at which emails are sent from my current server is usually 0.2 seconds. by email.
php email cron codeigniter
Michal m
source share