Mail problems with Outlook
| From: | Schalk | Date: | Sat, 08 Apr 2006 22:52:33 +0000 |
| Subject: | Mail problems with Outlook | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-233586@lists.php.net to get a copy of this message | ||
Greetings All,
Is there any reason why the following code will correctly set the FROM and Reply-to fields in Thunderbird but not Outlook? Thanks!
$firstName = $_POST['Contact_FirstName'];
$lastName = $_POST['Contact_LastName'];
$address = $_POST['Contact_Address'];
$homePhone = $_POST['Contact_HomePhone'];
$bestTime = $_POST['R1'];
$email = $_POST['Contact_Email'];
$to = 'someone@somedomain.com';
$subject = "Request from www.helpmefindahome.info";
$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/html; charset=iso-8859-1\r\n".
"From: ".$email."\r\n".
"Reply-to: ".$email."\r\n". "Date: ".date("r")."\r\n";
// Compose message:
$message = "
<html>
<body>
<h1>Message From: ".$firstName. " " .$lastName.
"</h1>
First Name: ".$firstName."
<br />Last Name: ".$lastName."
<br />Address: ".$address."
<br />Home phone: ".$homePhone."
<br />Best time to contact: ".$bestTime."
<br />Email: ".$email."
</body>
</html>
";
// Send message
mail($to, $subject, $message, $headers);
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers