mail() - runs way too slow
Posted: Mon May 22, 2006 4:04 pm
How can I optimize sending email so that it doesn't use so much CPU?
I am trying to send out 800 customized emails once a week, that are dynamically customized based on user location. I've been using the mail() function. Last time I did this my host (JaguarPC) shut-down my account because it was using too much CPU to send these emails. I'm on a typical cheap shared hosting plan.
To send email they are using exim with spamassassin.
The last time I executed the script, it took 18 minutes (!!!) to send 800 emails. I'm 99.5% sure that the problem is the mail function, as my database operates fast for everything else.
They're running PHP 4.4.2.
I think there are some solutions that exist for sending out the SAME email to 800 different people, but want to send DIFFERENT emails.
Aaron
I am trying to send out 800 customized emails once a week, that are dynamically customized based on user location. I've been using the mail() function. Last time I did this my host (JaguarPC) shut-down my account because it was using too much CPU to send these emails. I'm on a typical cheap shared hosting plan.
To send email they are using exim with spamassassin.
The last time I executed the script, it took 18 minutes (!!!) to send 800 emails. I'm 99.5% sure that the problem is the mail function, as my database operates fast for everything else.
They're running PHP 4.4.2.
I think there are some solutions that exist for sending out the SAME email to 800 different people, but want to send DIFFERENT emails.
Aaron