Page 1 of 1

Send a mail with mail()

Posted: Sat Sep 13, 2008 7:47 am
by broch
Hi,
I want to send a mail with mail() and especially a EURO sign €

If I just send the message

$message = "€ Mail text";

it will turn up as a ?.
then I try to make a different header on the mail like this:

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=UTF-8\r\n";
$headers .= "Content-Transfer-Encoding: quoted-printable\r\n";

and then encode the $message with
$message = mb_convert_encoding($message,"quoted-printable","ASCII");

When I then receive the mail I just get a blank space in where the € should have been even though it looks correct when I check the source of the mail: =80 Mail text

So could anybody help me and tell mere what I do wrong, or if there is another way to send a € in a plain text email.

Help is much appreciated.

Thanks,
broch

Re: Send a mail with mail()

Posted: Sat Sep 13, 2008 11:47 am
by yacahuma
I suggest using phpmailer

Re: Send a mail with mail()

Posted: Sat Sep 13, 2008 6:08 pm
by broch
Yes, but it could be nice to understand this. I can though send it with text/html and convert to html-entities. That works

broch

Re: Send a mail with mail()

Posted: Sun Sep 14, 2008 3:49 pm
by budimir
I suggest you take a look at utf-8 table for special characters. You will see what you should put in so EUR sign whould show up. Or what ever encoding you are using.

Take a look at the links:

http://biega.com/special-char.html
http://goulvench.free.fr/vrac/UTF8codes.html

:wink: