cppit
cppit

Reputation: 4564

php mail() function strips off special characters on the subject

this is the code I have:

    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    $msg = "1'2 ’3"4 “5”6 7~8!9@10#11$12%13^14&15*16(17)18}19{20"21:22?23>24<25 ";
    $subject = "1'2 ’3"4 “5”6 7~8!9@10#11$12%13^14&15*16(17)18}19{20"21:22?23>24<25;
    mail("[email protected]",$subject,$msg);

the message comes complete, but the subject only shows

1'2 ’3

the subject comes from row['subject'] on the db. any ideas please?

Upvotes: 0

Views: 124

Answers (1)

ngen
ngen

Reputation: 8966

Try escaping the double quotes:

"1'2 ’3\"4 \“5\”6 7~8!9@10#11$12%13^14&15*16(17)18}19{20\"21:22?23>24<25 ";

Upvotes: 1

Related Questions