All, I have a problem sending Multipart - MIME (plaintext + html) email....
$bodyPlaintext = " (PLAINTEXT)"; $bodyHTML = " (HTML CODE)"; $headers = ""; $headers .= "From: [EMAIL PROTECTED]\r\n"; $headers .= "Reply-To: [EMAIL PROTECTED]\r\n"; $headers .= "X-Mailer: PHP " . phpversion(); $subject = "Alert! Confirmation!"; //unique boundary $boundary = uniqid("HTMLBODY"); //add From: header //$headers = "From: [EMAIL PROTECTED]\r\n"; //specify MIME version 1.0 $headers .= "MIME-Version: 1.0\r\n"; //tell e-mail client this e-mail contains//alternate versions $headers .= "Content-Type: multipart/alternative; boundary = $boundary\r\n\r\n"; //message to people with clients who don't //understand MIME $headers .= "This is a MIME encoded message.\r\n\r\n"; //plain text version of message $headers .= "--$boundary\r\n" . "Content-Type: text/plain; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode($bodyPlaintext)); //HTML version of message $headers .= "--$boundary\r\n" . "Content-Type: text/html; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode($bodyHTML)); sent with: mail($email, $subject, "", $headers); Now... the problem I have is some people are reporting they get the Multi-part stuff as the body... for others it'll work as wanted... i.e. display Plaintext or render the HTML as wanted. Anyone had this problem? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php