You are here: mail() takes a long time to process « PHP « IT news, forums, messages
mail() takes a long time to process

Posted by Dustin Krysak on 10/21/03 11:09

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@one.com";

$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);

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация