PHP mail - Special Characters
Posted on 2006-07-12
I'm wondering how to handle special characters like for example ä,ö,ü, etc. in plain-text e-mails...
I have a contact form with a text-area - the text submitted from this is included in a mail sent to the website operators. This text can contain special characters. I simply use a content-type header with text/plain and UTF-8 encoding.
This seems to work fine for me (Mozilla Thunderbird) but it may be that it's not displayed correctly in other clients (Pegasus for example) - I have to confirm this though.
When the enquiry mail is sent, another e-mail is sent to the sender basically like a personalised auto-responder.
The text for this mail is specified in the php script itself and contains some 'Ü's. I also use plain/text, UTF-8 for this mail and use the utf8_encode() function. Using this method the special characters seem to display correctly in both Thunderbird and Outlook Express, but my client told me that it doesn't display properly in her mail-client (Pegasus).
How can I ensure that the mail is displayed properly in all mail-clients ?
Again, both mails are plain-text, no HTML...