PDA

View Full Version : Email question



Multi-Task
April 14th, 2006, 02:49 PM
Trying to get php email working having problems. Can anyone see any problems with code. Any help is greatly appreciated. Thanks in advance.



//begin creation of the email
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: example@example.com";
$message1 = "<html><body>
$messagecontent
</html></body>";
// mail("$_SESSION[e_mail], test@example.com", "Thank you for Signing-Up with Example", $message1, $headers);

// mail("$_SESSION[e_mail]", "Thank you for Signing-up with Example", "$message1", "From: signup@example.com\r\nReturn-Path: d@example.com\r\nBCC: example@example.com\r\n");

mail("$e_mail, signup@example.com", "Thank you for Signing-Up with Example", $message1, $headers);



header('Location: signup4.php');


?>
<!--END PHP CODE-->

Ben Smith
April 14th, 2006, 03:48 PM
Well, you've commented out the mail function...

Ankou
April 14th, 2006, 05:09 PM
What happens when you send the mail? Any errors, warnings or notices?


You can always try:


if(mail("$e_mail, signup@example.com", "Thank you for Signing-Up with Example", $message1, $headers)){
echo "Mail sent";
}else{
echo "Mail not sent";
}

That will at least tell you if the mail is being accepted for delivery.