PDA

View Full Version : Mail Converting To Hex...How do I stop it?


ibeblunt
Mon 21st Jul '03, 11:57am
The other day, my CMS sent out a daily alert to my e-mail list.

In the mail subject it read:
Dr. Dre and Eminem Face $10 Mil Copyright Suit

But in the actual mail body it read:
Dr. Dre and Eminem Face #36; 10 Mil Copyright Suit

I looked back to previous e-mails the CMS has sent out and noticed that it's always converted the $ to #36; since I wrote the program...I never noticed it. Any ideas on what I should do?

Just for clarification.

The subject line is saved in the database as Dr. Dre and Eminem Face $10 Mil Copyright Suit. The code for the message body is pulled from the database and put into an array. The array would be $article_ARRAY['contentheadline']. I use this for $mail_subject AND $mail_body...It doesn't bother the ampersand as a mail subject, only in the mail body.

I have pasted the code that I've been using below:


$mail_to = "steven@sohh.com";

$mail_subject = $article_ARRAY['contentheadline'];

$mail_headers = "Bcc: " . $bcc_email . "\r\n";
$mail_headers .= "From: SOHH Alert <alerts-list@sohh.com>\r\n";
$mail_headers .= "Reply-To: alerts-list@sohh.com\r\n";
$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
$mail_headers .= "X-Mailer: SOHH Alert - PHP / " . phpversion() . "\r\n";

$mail_body = $article_ARRAY['contentheadline'];

mail($mail_to,$mail_subject,wordwrap(stripslashes( $mail_body),69),$mail_headers);


Thanks for reading.

one