Speedup the sending of email

General discussions related to php

Moderators: macek, egami, gesf

liderbug
New php-forum User
New php-forum User
Posts: 20
Joined: Mon Feb 14, 2011 7:14 pm

Speedup the sending of email

Postby liderbug » Thu Sep 26, 2013 11:20 am

Looking for some advice. I've copied a PHP/Mail script <psudo code>
setup;
build_email_body;
mysql select email from cust where...
while (fetch...
{
use relay.dnsexit.com (user/passwd);
set headers, smtp, body
$mail = $smtp->send($em[0], $headers, $body);
if error...
}

So it runs fine except it takes about 1(+) second at the $smtp->send line for a total run time of over 3.5 minutes. I've proved that it's that line "#" and echo $em[0] instantly gives me a full screen. I've tried to change the line to exec(use_a_bash_script...) and it doesn't go any faster. dnsexit says I can't send them fast enough to have a problem, so I should be able to send 200 in 1 second not the other way around.

Anybody else been down this path? Know some neet trick?
Thanks a lot.
Chuck

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Speedup the sending of email

Postby johnj » Fri Sep 27, 2013 8:41 pm

Does php/mail script have documentation??? if so, please take a look at it.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 2 guests

cron