This is my code in PHP to do when a form is submitted, everything works and I am receiving the mail but it is not putting a new line where the '\r\n' is. Any ideas?
Help with simple PHP code?
6
This is my code in PHP to do when a form is submitted, everything works and I am receiving the mail but it is not putting a new line where the '\r\n' is. Any ideas?
<?php
if ($_POST["mail"]<>'') {
$ToEmail = 'xxx@yyy.com';
$EmailSubject = 'Contact Form';
$mailheader = "From: ".$_POST["mail"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["mail"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "Name: ".$_POST["name"]."\r\n";
$MESSAGE_BODY .= "Email: ".$_POST["mail"]."\r\n";
$MESSAGE_BODY .= "Comment: ".$_POST["message"]."\r\n";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
header("location:index.html");
}
?>
<?php
if ($_POST["mail"]<>'') {
$ToEmail = 'xxx@yyy.com';
$EmailSubject = 'Contact Form';
$mailheader = "From: ".$_POST["mail"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["mail"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "Name: ".$_POST["name"]."\r\n";
$MESSAGE_BODY .= "Email: ".$_POST["mail"]."\r\n";
$MESSAGE_BODY .= "Comment: ".$_POST["message"]."\r\n";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
header("location:index.html");
}
?>
- Brandon Tanner
- Backlinks Explorer
- [1] reply
- Brandon Tanner
- Rob Whisonant
- Jr180180
Next Topics on Trending Feed
-
6