Re: Sending Mail with PHP
| From: | Jordi Canals | Date: | Thu, 06 May 2004 16:03:22 +0000 |
| Subject: | Re: Sending Mail with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185538@lists.php.net to get a copy of this message | ||
Justin @ Dreaming in TO wrote:
However, the page it redirects to is blank, except for the background image that is referenced in the CSS stylesheet. Feel free to test it as many times as you would like.
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: FunctionJunkie WebMailer" );
exit ;
?>
You are doing _nothing_ after sending the e-mail ... You are just exiting the script. So, no page is loaded.
Try something like that:
if (mail()) {
header("Location: $thankyouurl");
} else {
header("Location: $errorurl");
}
Regards,
Jordi.