problems with mail()
| From: | Chris Lee | Date: | Fri, 23 Feb 2001 22:25:17 +0000 |
| Subject: | problems with mail() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41384@lists.php.net to get a copy of this message | ||
mail seems to be just throwing the 'extra headers' in with the body...
$email_text_body = "Hello {$people->people_name[$pos]} how are you
today?";
$email_html_body = "<html>";
$email_html_body .= "<body>";
$email_html_body .= "<table>";
$email_html_body .= "<tr bgcolor=eeeeee>";
$email_html_body .= "<td>";
$email_html_body .= "<font size=+2 face=ffffff>Hello
{$people->people_name[$pos]} How are you today?</font>";
$email_html_body .= "</td>";
$email_html_body .= "</tr>";
$email_html_body .= "</table>";
$email_html_body .= "</body>";
$email_html_body .= "</html>";
$email_boundary = uniqid('HTML');
$email_headers = "From: MyHearingStore.com
<info@myhearingstore.com>\r\n";
$email_headers .= "Return-Path: <info@myhearingstore.com>\r\n";
$email_headers .= "MIME-Version: 1.0\r\n";
$email_headers .= "Content-Type: multipart/alternative;\r\n
boundary='$email_boundary'\r\n";
$email_headers .= "This is a multi-part message in MIME format.\r\n\r\n";
$email_body = "--$email_boundary\r\n";
$email_body .= "Content-Type: text/plain;\r\n charset='ISO-8859-1'\r\n";
$email_body .= "Content-Transfer-Encoding: ISO-8859-1\r\n\r\n";
$email_body .= $email_text_body;
$email_body .= "--$email_boundary\r\n";
$email_body .= "Content-Type: text/html;\r\n charset=ISO-8859-1\r\n";
$email_body .= "Content-Transfer-Encoding: ISO-8859-1\r\n\r\n";
$email_body .= $email_html_body;
mail($people->people_email[$pos], 'An HTML Message', $email_body,
$email_headers);
outputs this.
Return-Path: <nobody>
Received: (from nobody@localhost)
by server.mediawaveonline.com (8.9.3/8.9.3) id PAA30279;
Fri, 23 Feb 2001 15:55:53 -0800
Date: Fri, 23 Feb 2001 15:55:53 -0800
From: Nobody <nobody@server.mediawaveonline.com>
Message-Id: <200102232355.PAA30279@server.mediawaveonline.com>
To: lee@mediawaveonline.com
Status:
Subject: An HTML Message
From: MyHearingStore.com <info@myhearingstore.com>
Return-Path: <info@myhearingstore.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary='HTML3a96f889828b4'
This is a multi-part message in MIME format.
--HTML3a96f889828b4
Content-Type: text/plain;
charset='ISO-8859-1'
Content-Transfer-Encoding: ISO-8859-1
Hello test how are you today?--HTML3a96f889828b4
Content-Type: text/html;
charset=ISO-8859-1
Content-Transfer-Encoding: ISO-8859-1
<html><body><table><tr bgcolor=eeeeee><td><font size=+2
face=ffffff>Hello
test How are you today?</font></td></tr></table></body></html>
its supposed to be this.
Return-Path: <nobody>
Received: (from nobody@localhost)
by server.mediawaveonline.com (8.9.3/8.9.3) id PAA30279;
Fri, 23 Feb 2001 15:55:53 -0800
Date: Fri, 23 Feb 2001 15:55:53 -0800
From: Nobody <nobody@server.mediawaveonline.com>
Message-Id: <200102232355.PAA30279@server.mediawaveonline.com>
To: lee@mediawaveonline.com
Subject: An HTML Message
From: MyHearingStore.com <info@myhearingstore.com>
Return-Path: <info@myhearingstore.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary='HTML3a96f889828b4'
This is a multi-part message in MIME format.
Status:
--HTML3a96f889828b4
Content-Type: text/plain;
charset='ISO-8859-1'
Content-Transfer-Encoding: ISO-8859-1
Hello test how are you today?--HTML3a96f889828b4
Content-Type: text/html;
charset=ISO-8859-1
Content-Transfer-Encoding: ISO-8859-1
<html><body><table><tr bgcolor=eeeeee><td><font size=+2
face=ffffff>Hello
test How are you today?</font></td></tr></table></body></html>
any idea's ???
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
lee@mediawaveonline.com