Jump to content

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 = "123@abc.com ";
$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: 321@cba.com' ;

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: xxxx@gmail.com
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: <apache@xxxxxxx.net>
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 apache@xxxxxxx.net)
Received: by xxxxxxxxx.net (Postfix, from userid 13)
id 7E25E188392; Fri, 26 May 2006 07:06:54 -0400 (EDT)
To: 123@abc.com
Subject: Subject
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="bound1"
From: xxx@xxxxxx.net
Message-Id: <20060526110654.7E25E188392@xxxxxxxxx.net>
Date: Fri, 26 May 2006 07:06:54 -0400 (EDT)
From: apache@xxxxxxxx.net (system user for apache-conf)

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


<HTML>

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

[blockquote]Message-Id: <20060526110654.7E25E188392@xxxxxxxxx.net>
Date: Fri, 26 May 2006 07:06:54 -0400 (EDT)
From: apache@xxxxxxxx.net (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
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.