Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multilanguage in PHP feedback forms

Status
Not open for further replies.

silverphpt

Technical User
Joined
Feb 24, 2004
Messages
3
Location
CA
Hi,

When I send non-English text in PHP online feedback forms, it comes as garbage in email client.

The webpage has 'charset=UTF-8' so it gets & sends right text, the php script use right mail call as here:

mail($mailto, $subject, $message,
"From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );


Please advice how it can be fixed.
Thanks.
 
You probably need to set the correct language encoding in the SMTP message headers. It may be the "X-Accept-Language" header.

You might also poke around in the code for the PHPMailer SMTP class to see what's there: PHPMailer

You might also send yourself an email from a client set to use that language and see what headers are sent.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
I setup additional header info in PHP mail() call like:

MIME-Version: 1.0\nContent-type: text/html; charset=utf-8

It works, but all 'new line' characters are missing in comming email.
How can I fix it?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top