Page 1 of 1

PHPMailer - inconsistent sending of multiple emails

Posted: Thu Aug 14, 2008 8:40 pm
by mottwsc
I'm using PHPMailer to send a number of emails. I get the result of a query on email addresses and then go through a loop to send each email. I cannot send them as a group since I don't want all recipients to see everyone's email address.

I'm using a test group of 100 records. One time, it will get all the way through. The next time, it will send 18. The next time, 77. So, I can't count on this. I've put a delay in with usleep() after so many records, but I will have much larger volumes and I'm trying to not delay the sending too much. Can anyone shed any light on why there are inconsistent send counts, especially since they vary so widely on a small bacth? If I can understand the factors that cause it to fail, maybe I can control them better.

I'm sending them through my Comcast account for the meantime as a test. I'm sure a dedicated server would perform better, but it is important to understand what affects this since I'll have much larger volumes on the dedicated server. I would think that this small amount through the Comcast server shouldn't pose a problem.

Thanks for any suggestions.

Re: PHPMailer - inconsistent sending of multiple emails

Posted: Fri Aug 15, 2008 7:20 am
by mach
I use class PHPMailer for the same purpose. The emails are stored in database first and every minute 100 adresses are retrieved and emails send one by one by PHPMailer . The database is server wide, so I am sure only 100 messages is being send every minute. I observed the server load when a client was sending thousands of messages this way. The load increase was very significant although not critical and it took perhaps 20 seconds to send these 100 messages. This was a private web/database server, 2GB RAM, very lightly loaded (e.g. average are only 20 myslq queries per second).

Hope it helps.