I'm having a problem escaping double quotes in email messages sent with
mail(). The message is built as a string and assigned to a variable and the
variable name is passed to the mail function.

The double quotes appear correctly in a simple test like this:
$message = "This message uses 'single' and \"double\" quotes.";
mail($sendto, $subject, $message, $headers);

But if $message is built in another part of the script and passed as a
hidden input of a form, the email arrives with the message truncated at the
first double quote encountered. If I do a str_replace() on $message to
escape double quotes, the email shows the escaping backslash but is still
truncated at the double quote!

I've got magic_quotes on, but I think I'm keeping up with stripslashes
because single quotes are showing up correctly.

Can anyone please advise?

--
Lowell Allen


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to