Jump to content

How to get rid of BAD HEADER...


Germaris

Recommended Posts

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

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.