Forum Moderators: coopster
I am working on a job board for a client and i am trying to do a mass email to all jobseekers(there are currently over 1000 jobseekers).
I am using the php mail() function in a loop. When i try to send out emails to just some of the jobseekers, it works fine. But when i try to send out emails to all the jobseekers, i am getting the following error:
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/ployjam/public_html/admin/emailall.php on line 63
etc.....
Although I must admit to using mail() in a loop to send email to 1300+ subscribers of mine, it is not the best way to do it. I think you should be accessing sendmail directly when sending that many emails. (I'll figure out how to do it some day soon! ;) )
Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.
For the sending of large amounts of email, see the PEAR::Mail, and PEAR::Mail_Queue packages.
has anyone used this before?
try using a counter to isolate where it dies if you like
I am guessing it is a throttle from your ISP as barns mentioned above
my ISP used to stop around 500 consecutive emails. I used to stage them over time, sending 25k over 24 hours or so. used a cron that would grab a chunk and setup the emails and fire them into the mail queue.
I also have written the emails to their own file, kind of a pseudo queue, as they aren't waiting in the actual mail queue. I had a cron that would check to see if there was anything in that file, then append whatever was there to the real queue.
both worked, we also had our own mail servers so we had a little more access to things.
the key is, email sucks ;)