multipart/alternative email
| From: | Bill Bolte | Date: | Tue, 29 May 2007 20:10:42 +0000 |
| Subject: | multipart/alternative email | ||
| References: | 1 2 3 4 5 6 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27988@lists.php.net to get a copy of this message | ||
OOPS, forgot to change the subject line! Should be multipart/alternative
email...
-----Original Message-----
From: Bill Bolte [mailto:billb@hightouchinc.com]
Sent: Tuesday, May 29, 2007 3:10 PM
To: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Re: WAMP Clustering
trying to send a multipart email (with text and html options). every so
often in the resulting email i see some spaces and an !. could be right
in the middle of a word or in between some words, doesn't matter. nor
can I really establish that's it's after so many characters. below is
the code, can anyone see if I'm missing something?
$mime_boundary = "----High Touch Inc----".md5(time());
$to = $email;
$subject = "2008 High Touch Users Conference Date Survey";
$headers = "From: Webmaster <webmaster@hightouchinc.com>\n";
$headers .= "Reply-To: Webmaster <webmaster@hightouchinc.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative;
boundary=\"$mime_boundary\"\n";
$message = "--$mime_boundary\n";
//$message .= "Content-Type: text/plain; charset=UTF-8\n";
//$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
$message .= "Content-Transfer-Encoding: 7bit\n\n";
$message .= $tmsg."\n";
$message .= "--$mime_boundary\n";
//$message .= "Content-Type: text/html; charset=UTF-8\n";
//$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$message .= "Content-Transfer-Encoding: 7bit\n\n";
$message .= "<html>\n";
$message .= "<body style=\"font-family:Verdana, Verdana, Geneva,
sans-serif; font-size:14px; color:#666666;\">\n";
$message .= $hmsg."\n";
$message .= "</body>\n";
$message .= "</html>\n";
$message .= "--$mime_boundary--\n\n";
$mail_sent = @mail( $to, $subject, $message, $headers );
echo $mail_sent ? "Mail sent<br />" : "Mail failed<br />";
Bill
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php