PHPMailer - inconsistent sending of multiple emails

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mottwsc
Forum Commoner
Posts: 55
Joined: Sun Dec 23, 2007 8:01 pm

PHPMailer - inconsistent sending of multiple emails

Post 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.
mach
Forum Newbie
Posts: 5
Joined: Thu Aug 14, 2008 8:10 am

Re: PHPMailer - inconsistent sending of multiple emails

Post 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.
Post Reply