Germaris Posted November 10, 2007 Share Posted November 10, 2007 Greetings! From a Flash based form, users of my site can send emails. This is the PHP Script I use to: <?php $sender = stripslashes($_POST["sender" ]); $sender_mail = stripslashes($_POST["sender_mail" ]); $to = stripslashes($_POST["to" ]); $email = stripslashes($_POST["email" ]); $subject = stripslashes($_POST ["subject" ]); $body = stripslashes($_POST ["body" ]); $footer="\n\n---------------------------\nMail sent by: $s_name <$s_mail>\n"; $message = $body.$footer; mail("\"".$to."\" <".$email.">", $subject, $message, "From: \"".$sender."\" <".$sender_mail.">"); ?> Alas, the mail messages don't accurately display the accented characters (à è é etc...) when using French language. The message header show: X-Amavis-Alert: BAD HEADER, Non-encoded 8-bit data (char E9 hex): From: "G\351rard Mariscalchi... Any idea to solve this problem? Many thanks in advance for your help! Gerry Link to comment https://forums.phpfreaks.com/topic/76742-how-to-get-rid-of-bad-header/ Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 looks like there is a problem in your $sender_mail variable it has some special characters Link to comment https://forums.phpfreaks.com/topic/76742-how-to-get-rid-of-bad-header/#findComment-388525 Share on other sites More sharing options...
Germaris Posted November 10, 2007 Author Share Posted November 10, 2007 I don't think it's a "problem". For example, I have a french first name which is "Gérard". I must write it as is. That's the way it is... Why should I comply with anglo-saxon rules in order to not generate bad headers? I think there's a problem with characters encoding... Link to comment https://forums.phpfreaks.com/topic/76742-how-to-get-rid-of-bad-header/#findComment-388529 Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 Yes I understand I'll check it up and let you know If I find something Link to comment https://forums.phpfreaks.com/topic/76742-how-to-get-rid-of-bad-header/#findComment-388530 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.