Jump to content

Help sending mail in HTML format to Outlook


ghgarcia

Recommended Posts

I need some help in what I need to do to create an email message in HTML to be displayed correctly in Outlook. Currently my messages will display correctly in any web based mail client. I only have a problem dealing with Microsoft Outlook. I can't find what trigger I need to set in the header or body of the message to make it work. Currently the headers that I'm creating are:

BCC: ghgarcia@lvbash.com, From: ghgarcia@lvbash.com Reply-To: ghgarcia@lvbash.com Return-Path: ghgarcia@lvbash.com MIME-Version: 1.0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit

Any help would be greatly appreciated.

George
Link to comment
Share on other sites

I just finished a project where we tied our company intranet into Outlook -- here's the HTML content type:

Content-Type:text/html

Works like a charm.  Here's a code snippet also:

$Header = "From: Company Name <someone@domain.com>\n";
$Header .= "Content-Type:text/html";

$Subject = 'Email Subject Here';

$Message = 'HTML code here (remember to escape quotes)';

mail ("to@address.com", $Subject, $Message, $Header);
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.