Outlook 2007 - Does not display html correctly

Posted on 2009-04-20
Last Modified: 2013-12-17
I have a form that emails out, via PHP, and then redirects to PayPal. The form emails out to 4 people, 2 are using outlook 2003 and 2 are using outlook 2007. Both 2003 users get the email fine. One of the 2007 users gets the email fine the other gets the email as plain text instead of HTML. I have tried changing the settings for plain text and email with no luck. I was able to change the PHP email headers to get the message to display the HTML. I now have the mail servers spam assasin bleeding over into the email on the one user using 2007 outlook. The other 3 users still recieve the message fine.
$to      = 'administrator@website';

$subject = "subject";

$message = "content";

$headers = 'Content-type: text/html;' . "\r\n";

$headers .= 'From:' . "\r\n";

mail($to, $subject, $message, $headers);

Open in new window

Question by:tech1984
    1 Comment
    LVL 2

    Accepted Solution

    Test the below code. Hope this helps.

    // Tobias

    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; 
    $headers .= 'To: '.$to.' <'.$to.'>' . "\r\n";
    $headers .= 'From: Website <>' . "\r\n";
    $headers .= 'Cc: ' . "\r\n";
    $headers .= 'Bcc: ' . "\r\n";

    Open in new window


    Featured Post

    Free book by J.Peter Bruzzese, Microsoft MVP

    Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

    Join & Write a Comment

    Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
    This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to dynamically set the form action using jQuery.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now