Mail text/hml Outlook Issue

This is the headers from my mail script.
[php]
$headers = ‘From: MGV [email protected]’."\r\n";
$headers .= ‘Reply-To: MGV [email protected]’."\r\n";
$headers .= ‘MIME-Version: 1.0’."\r\n";
$headers .= ‘Content-type: text/html; charset=UTF-8;’."\r\n";
$headers .= ‘Content-Transfer-Encoding: 8bit;’."\r\n";
[/php]
This is what I get in Outlook as plain text.

Content-type: text/html; charset=UTF-8; 
Content-Transfer-Encoding: 8bit;


    <!DOCTYPE html>
    <html dir="ltr" lang="en-US">
      <head>
        <title></title>
        <meta charset="utf-8" />
      </head>
...

Does anyone know what I am doing wrong, I have run into this issue before and never quite figured it out.

How are you acctually sending the mail? With the php mail function?

Could you post the code that actually sends the e-mail?

This is the function I am using to send out the mail.
[php]echo mail($s3[‘email’], ‘MGV - Reservation’, $email, $headers)?‘sent’:‘failed’;[/php]

The mail gets sent, just does not work in Outlook, but is fine in Gmail.

I have thought of sending through SMTP, but this is a custom section in WP that I built and I am not sure about how to do this.

I did a quick google and had a look at http://www.techrepublic.com/forum/questions/101-259579.

Which suggested trying:

Tools > Trust Center > Email Security > uncheck 'read all messages as plain text'.

Are you sure HTML mail is enabled in Outlook?

I can receive HTML emails from other sources.

[php]
$headers = ‘From: MGV [email protected]’."\n";
$headers .= ‘Reply-To: MGV [email protected]’."\n";
$headers .= ‘MIME-Version: 1.0’."\n";
$headers .= ‘Content-type: text/html; charset=UTF-8;’."\n";
$headers .= ‘Content-Transfer-Encoding: 8bit;’."\n";
[/php]

This is the working code. This took me hours to figure out. But apparently you can’t have “\r” in Outlook. My only question is will this break other email clients?

I think the only way to find out would be to test some.

Sponsor our Newsletter | Privacy Policy | Terms of Service