Hello,
The problem may be with Outlook, I'm not sure.
I have a contact form that is sent using PHP, but for some reason if "From" is the first word on a line in the $message portion, it get's changed to ">From" when I get the e-mail in Outlook.
/* E-mail Variables */
$mailname = $fvd_name;
$maildomain = $sv_domain;
$mailsubject = $fvd_subject;
$mailemail = $fv_email;
$mailoffer = $fvd_offer;
$mailmessage = nl2br($fvd_message);
/* recipients */
$to = "Gateway Domains <name@domain.com>";
$subject = "$mailsubject";
/* message */
$message =
"From Person: $mailname<br>
E-mail: $mailemail<br>
Domain: $maildomain<br>
Offer: $mailoffer<br>
From Country:
<br>
========= MESSAGE ==========<br>
<br>
$mailmessage<br>
<br>
";
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: $mailname <$mailemail>\r\n";
$headers .= "Reply-To: $mailname <$mailemail>\r\n";
$headers .= "Bcc: ";
/* and now mail it */
mail($to, $subject, $message, $headers, '-f$mailemail');
header("Location: /contact.php?sent=Y");
} // end if($vald_form == "P")
So if after being parsed the message section looked like this:
$message =
"From Person: John Doe<br>
E-mail: johndoe@hisdomain.com<br>
Domain: somedomainname.com<br>
Offer: $100<br>
From Country: Fakeistan<br>
<br>
========= MESSAGE ==========<br>
<br>
From what price would you be willing to negotiate?<br>
<br>
";
I would get the e-mail in Outlook like this:
>From Person: John Doe
E-mail: johndoe@hisdomain.com
Domain: somedomainname.com
Offer: $100
From Country: Fakeistan
========= MESSAGE ==========
From what price would you be willing to negotiate?
Notice how the three instances of "From" have been changed to ">From". When I send the form contents to my gmail or yahoo account instead I don't see the ">". Maybe those accounts are NOT parsing the e-mail as HTML. Outlook is. Is there something about the way Outlook handles the HTML?
If anyone has experienced this or has any tips, that would be appreciated.
Thanks!
Peter