Forum Moderators: coopster
I then tried using Pear::Mail, but found that popen() was disabled for security reasons and fopen() gives me the following error:
Warning: fopen(/usr/sbin/sendmail/): failed to open stream: Permission denied in /home/path/to/script.php on line 20
So it looks like I can't use sendmail, either. :(
What other options are open to me? The only other thing that I can think of is to continue to use mail() in a loop but to pause the script after 500 emails or so.
(I have emailed by host to ask what they suggest, too.)
How did you cope with a script maximum execution time if it was only sending 100 emails every 5 minutes? Or did you have some way of running the script on separate occasions and it recognised which people had and had not been emailed yet? Was it the solution that you mentioned here [webmasterworld.com]?
I dumped the emails into a db table
email, datetime, customer id and a sent column
then running a cron
select email from tablename where sent='no' limit 100;
as I loop through set sent='yes' after each email is sent.
then stop, cron starts again
we also had a requirement to track opt ins response etc, that was all managed in a related table, we kept datetimes anytime a mailout was sent and who acted upon the email.