Jump to content

PHP HTML mail problem when emailing MS Exchange and Outlook


vattaylor

Recommended Posts

PHP HTML mail problem when emailing MS Exchange and Outlook

Can someone pleas help me with this problem as I can not fix :(

I have some code the will send a HTML emile for PHP and work OK sending it to a G-mail or Yahoo account but not to a Outlook.

Here is my code.

[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]
$to = "[email protected] ";
$subject = "Subject";
$message = "
--bound1\rContent-Type: text/html\rContent-Transfer-Encoding: 7bit\r
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email conatins HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
--bound1--
";
$headers .= "MIME-Version: 1.0" . "\r";
$headers .= "Content-type: multipart/mixed; boundary=\"bound1\"" . "\r
$headers .= 'From: [email protected]' ;

mail($to,$subject,$ws_message,$headers);[!--colorc--][/span][!--/colorc--]


This work ok when sending of Gmail or Yahoo accounts but all you get in Outlook is

[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]--bound1
Content-Type: text/html
Content-Transfer-Encoding: 7bit\r
<html>
<hea…….. [!--colorc--][/span][!--/colorc--]
And so on.

I have notice that there are extra line being added to the header this is what in my head after the email has been delivered.
[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]
X-Gmail-Received: 5d45dd8893ad42c7082ea952f4e5dedd17da4b75
Delivered-To: [email protected]
Received: by 10.85.9.15 with SMTP id m15cs26802aui;
Fri, 26 May 2006 04:05:12 -0700 (PDT)
Received: by 10.67.100.19 with SMTP id c19mr113557ugm;
Fri, 26 May 2006 04:05:11 -0700 (PDT)
Return-Path: <[email protected]>
Received: from tamworthweb.net (81-179-81-136.dsl.pipex.com [81.179.81.136])
by mx.gmail.com with ESMTP id o1si336508uge.2006.05.26.04.05.11;
Fri, 26 May 2006 04:05:11 -0700 (PDT)
Received-SPF: neutral (gmail.com: 81.179.81.136 is neither permitted nor denied by best guess record for domain of [email protected])
Received: by xxxxxxxxx.net (Postfix, from userid 13)
id 7E25E188392; Fri, 26 May 2006 07:06:54 -0400 (EDT)
To: [email protected]
Subject: Subject
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="bound1"
From: [email protected]
Message-Id: <[email protected]>
Date: Fri, 26 May 2006 07:06:54 -0400 (EDT)
From: [email protected] (system user for apache-conf)

--bound1148588670
Content-Type: text/html
Content-Transfer-Encoding: 7bit


<HTML>

<HEAD>
. . . .[!--colorc--][/span][!--/colorc--]
The lines

[blockquote]Message-Id: <[email protected]>
Date: Fri, 26 May 2006 07:06:54 -0400 (EDT)
From: [email protected] (system user for apache-conf)[/blockquote]

I have not put in and I don’t know you they are or how to stop them.

I hope some one can help me please

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.