I would like to insert special characters in the subject of HTML e-mails sent with the PHP mail() function.
I want my subject to look like this:
★ Your new account
I have tried with an HTML entity like ★
(★) or by pasting the symbol directly in my code but that doesn't work either, except on a few e-mail clients.
$to = 'me@example.com';
$subject = '★ Your new account or ★ Your new account';
$message = 'HTML message...';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: Me <me@example.com>' . "\r\n";
mail($to, $subject, $message, $headers);
Any advice on how to get this to work properly? Thank you.
Try for subject:
And then: