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.
Multilanguage in PHP feedback forms
Moderator: General Moderators
-
silverphpd
- Forum Newbie
- Posts: 3
- Joined: Tue Feb 24, 2004 12:24 pm
- Fredix
- Forum Contributor
- Posts: 101
- Joined: Fri Jul 18, 2003 2:16 pm
- Location: Wehr (Eifel) Germany
- Contact:
Hm, hard to say. Actually German Umlaute should work but you probably mean something really diffrent like Russian or Chinese. Maybe you need to do something with the main headers?
Read the user's comments in the mail manual [php_man]mail[/php_man] to learn how to control the mail headers.
BUT this is just my guess!
Read the user's comments in the mail manual [php_man]mail[/php_man] to learn how to control the mail headers.
BUT this is just my guess!
-
silverphpd
- Forum Newbie
- Posts: 3
- Joined: Tue Feb 24, 2004 12:24 pm
Fredix, you are right. I fixed it, now the other problem.Fredix wrote:...Maybe you need to do something with the main headers?...
My email, comming from online PHP form, lost all newline characters.
It happend after I added additional header for PHP mail() call, like this one:
MIME-Version: 1.0\nContent-type: text/html; charset=utf-8
How can I get newline characters back?
Thanks.
- Fredix
- Forum Contributor
- Posts: 101
- Joined: Fri Jul 18, 2003 2:16 pm
- Location: Wehr (Eifel) Germany
- Contact:
MIME-Version: 1.0\nContent-type: text/html; charset=utf-8
means that you send a html file as a mail, therefore linebreaks must be also done with html <br />
btw: sending html mails means that you are sure that all your clients are able to read a html formatted email! (if they do not have the software for it but use text-only software PROBABLY they will be able to read the mail but also will see <p>, <br />, ... as text)
means that you send a html file as a mail, therefore linebreaks must be also done with html <br />
btw: sending html mails means that you are sure that all your clients are able to read a html formatted email! (if they do not have the software for it but use text-only software PROBABLY they will be able to read the mail but also will see <p>, <br />, ... as text)
-
silverphpd
- Forum Newbie
- Posts: 3
- Joined: Tue Feb 24, 2004 12:24 pm