mail() takes a long time to process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there, I have a script that uses the mail() function, but for some reason the script takes a really long time to finish processing (like 5 minutes). there are some other functions performed (like sql insert, etc) that happen immediately as they should. But the mail takes some time to finish processing. If I remove the mail function, the script finishes immediately. Any ideas? I have included my code below (used for the mail). ideas?

$ToMail = $_POST['ccEmail'];

$FromMail = "some@xxxxxxx";

$FromName = "The Name";

$Subject = "Your membership";

$xmailer = "PHP mailer";

$headers = "From: ".$FromName."<".$FromMail.">\r\n";
$headers .= "Reply-To: ".$FromName."<".$FromMail.">\r\n";
$headers .= "X-Mailer: ".$xmailer."\r\n";
$headers .= "Origin: ".$_SERVER['REMOTE_ADDR']."\r\n";

$Message = "Dear ".$_POST['ccfName']."\n,";
$Message .= "Thanks for joining the Coastal Crew!\n";
$Message .= "Below you will find the information required to verfiy your email address.\n";
$Message .= "Upon verification, an e-coupon will be presented to you in which you can print";
$Message .= " off for 20% off of your next purchase.\n\nBy clicking on this hyperlink:\n";
$Message .= $verify_url."\nand follow the directions in your web browser.\n\n";
$Message .= "Thank you,\nThe Coastal Crew.\n".$_SERVER['SERVER_NAME'];

$mailer = mail($ToMail, $Subject, $Message, $headers);


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux