Wrong chars in mail() function

the mail() function

Moderators: macek, egami, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 40
Joined: Thu Nov 07, 2002 5:58 am

Wrong chars in mail() function

Post by parxal » Wed Jan 28, 2004 4:56 pm

The code:

On FLash
loadVariablesNum("mail.php3", 5, "POST");

mail("xirika@hotmail.com", $subject, $message, "From: beAgency\nReply-To: $from\nX-Mailer: PHP/" . phpversion());

Well it works, but when i receive the mail, chars like ç and ã that exist in the protuguese keyboard are all fucked up.
Anyone knows why?

User avatar
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden

Post by gesf » Tue Feb 24, 2004 5:02 am

I´m not sure, but i think the problem is in the 'Content Type'!
Try this on your mail header:
(change to text/html if you´re using html mail!)

Code: Select all

Content-Type: text/plain; charset=iso-8859-1

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest