php html email
- Started
- Last post
- 3 Responses
- kinetic
ive built a php script to send html email out and its doing some really wacky things.
basically. it inserts ! marks throughout the message. if i view the message source and copy the message contents into a notepad file...the exclamation marks always occur at the end of each line.
here is the script:
// declare headers
$headers = "From: $from_email
";
$headers .= "Content-Type: text/html; charset=iso-8859-1
";
$headers .= "Reply-To: $from_email
";$message = stripslashes($message);
$message = str_replace(chr(13), "", $message);// send email
for ($i=0; $i<sizeOf($email_array); $i++) {
// build html message
$mailout = mail($email_array[$i], $subject, $message, $headers);
if ($mailout) {
echo "&result=success";
}
}anyone know what this could be caused by? i checked the script and there is not one ! mark in the whole thing.
this is really weird. i know its probably something stupid but i just cant figure it out.
thanks for any help :)
- kcathode0
You probably have to replace the newline characters as well as the slashes.
Are you getting the original value for $mesasge from an HTML form ?
- unfittoprint0
at php.net in the mail() function page there's a lot of info that you should read, regarding some less know issues regarding sending mail with PHP (like enconding, complete headers...)
http://pt.php.net/manual/en/func…
check the threads in that page (below).
- kinetic0
im sending it from a form in flash
i think it is the text field in our flash application that is screwing it up.
i just dumped the same body of text into the message variable and sent it and it turned out fine.