Re: http webmail problems.
| From: | Justin Patrin | Date: | Tue, 23 Mar 2004 21:26:53 +0000 |
| Subject: | Re: http webmail problems. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181311@lists.php.net to get a copy of this message | ||
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>