vattaylor Posted May 26, 2006 Share Posted May 26, 2006 PHP HTML mail problem when emailing MS Exchange and OutlookCan 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--]--bound1Content-Type: text/htmlContent-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: 5d45dd8893ad42c7082ea952f4e5dedd17da4b75Delivered-To: xxxx@gmail.comReceived: 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.comSubject: SubjectMIME-Version: 1.0Content-type: multipart/mixed; boundary="bound1"From: xxx@xxxxxx.netMessage-Id: <20060526110654.7E25E188392@xxxxxxxxx.net>Date: Fri, 26 May 2006 07:06:54 -0400 (EDT)From: apache@xxxxxxxx.net (system user for apache-conf)--bound1148588670Content-Type: text/htmlContent-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 Quote Link to comment https://forums.phpfreaks.com/topic/10501-php-html-mail-problem-when-emailing-ms-exchange-and-outlook/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.