2

I'm using PHPMailer to send emails. I'm sending prices through emails and it works fine on Gmail and Roundcube but on Hotmail my '£' sign appears as '£'.

I know this is because the charset is not set properly. I tried

$mail->Body = "
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
</head>
<body>
$content
</body>
</html>
";

but it seems that Hotmail strips the header, like most email clients.

How can I make sure my '£' sign appears correctly across different email clients?

Juicy
  • 11,840
  • 35
  • 123
  • 212
  • 1
    You need the header `Content-type: text/html; charset="utf-8"`. I don't know the PHPMailer API well enough to show how to do this. Mail readers won't use META tags. – Barmar Sep 21 '13 at 14:32

1 Answers1

3

You should use the following line to set the charSet.

$mail->CharSet = 'UTF-8';
elbuild
  • 4,869
  • 4
  • 24
  • 31