Speedup the sending of email

General discussions related to php

Moderators: egami, macek, gesf

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

Thu Sep 26, 2013 11:20 am

Looking for some advice. I've copied a PHP/Mail script <psudo code>
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.

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

Fri Sep 27, 2013 8:41 pm

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

Post Reply