title: Use emoji in dynamic content body of HTML email in PHP
body: <p>I have been trying to send an HTML email with PHPMailer containing emojis:</p>
  
  <pre><code>$mail = new PHPMailer();
  $mail-&gt;isHTML(true);
  $mail-&gt;CharSet = "UTF-8";
  $mail-&gt;Subject = "             ";
  $mail-&gt;Body = "             ";
  </code></pre>
  
  <p>However, the emojis are only displayed correctly in the subject; in the body, they are replaced by question marks (in Thunderbird and Outlook). The email does contain HTML, so just setting <code>isHTML</code> to <code>false</code> will not suffice. I have looked at <a href="https://stackoverflow.com/questions/39365797/send-unicode-emoji-with-phpmailer">Send unicode emoji with PHPMailer</a> , but it does not seem to work for me, as the character set is already set to UTF-8. The content is user-generated (the user uses their own mobile keyboard to insert the emoji), so manually replacing every emoji with, for example, an image is not an option. Preferably the solution would be dynamic, so that new emojis also work whenever they come out.</p>