note 108328 deleted from function.mail by crell
| From: | crell@php.net | Date: | Tue, 12 Apr 2022 01:09:38 +0000 |
| Subject: | note 108328 deleted from function.mail by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218218@lists.php.net to get a copy of this message | ||
Note Submitter: yarik dot bohatsky at gmail dot com
----
If you want to send UTF-8 HTML letter you need to mention charset twice:
1) In message header:
<?php
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
?>
2) In HTML header:
<?php
$message = '
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fillon soutient à fond le retour d\'un Grand Prix de France</title>
</head>
<body>
<p>Le Premier ministre François Fillon, passionné d\'automobile et pilote Ã
ses heures, a apporté un soutien appuyé au retour d\'un Grand Prix de France au
calendrier 2013 de la Formule 1, en faisant un passage-éclair vendredi sur le circuit Paul Ricard
dans le Var.</p>
</body>
</html>
';
In this case Outlook will also "understand" that message is encoded using UTF-8.