Tom Reed wrote:

thanks for the FYI on PEAR, installing now.

I'd still be interested in understanding why the header data in my code
didn't work.

-tom
"Justin Patrin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Tom Reed wrote:


On some webmail programs, when I send them an email from php, they

appear as


being "blank" emails.

Here's the code I am using:

 $headers .= "From: \"$WEBSITE_name\" <$ADMIN_email>\n";
 $headers .= "X-Sender: <$ADMIN_email>\n";
 $headers .= "X-Mailer: $WEBSITE_name Mailer\n"; // mailer
 $headers .= "X-Priority: 1\n"; // Urgent message!
 $headers .= "Return-Path: <$ADMIN_email>\n";  // Return path for

errors


 $headers .= "MIME-version: 1.0\n";
 $headers .= "Content-type: multipart/mixed; ";
 $headers .= "boundary=\"Message-Boundary\"\n";
 $headers .= "Content-transfer-encoding: 7BIT\n";

 $message = "--Message-Boundary\n";
 $message .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime

type


 $message .= "Content-transfer-encoding: 7BIT\n";
 $message .= "Content-description: Mail message body\n\n";

$message .= "<b>Test message with html</b>";

mail($email, "Test HTML message.", $message, $headers);

Try using PEAR's Mail_MIME class. It will do this kind of thing for you. http://pear.php.net/package/Mail_MIME

--
paperCrane <Justin Patrin>

Perhaps the lines need to be ended with \r\n?


--
paperCrane <Justin Patrin>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to