4

Recently I have received newsletters with emojis in the subject line..

I have copy/pasted a subject from the source of a newsletter

Subject: =?utf-8?Q?=F0=9F=94=A5=C2=A06=20days=20left=20until=20we=20meet=20you=20at=20TechBBQ=C2=A0=F0=9F=94=A5?=

enter image description here

I use phpmailer to send emails.. How is it possible to reuse the same icons when sending messages?

clarkk
  • 27,151
  • 72
  • 200
  • 340
  • Possible duplicate of [How to convert Emoji from Unicode in PHP?](https://stackoverflow.com/questions/33547233/how-to-convert-emoji-from-unicode-in-php) – yivi Oct 10 '17 at 13:51
  • 2
    Possible duplicate of [Send unicode emoji with PHPMailer](https://stackoverflow.com/questions/39365797/send-unicode-emoji-with-phpmailer) – Matt S Oct 10 '17 at 13:56

1 Answers1

7
$subject = "\xF0\x9F\x94\xA5 test \xF0\x9F\x94\xA5";

This will put a fire emoji like the above in the beginning and the end of the string when sending with phpmailer. Rememeber to set the encoding in the mail to UTF-8

clarkk
  • 27,151
  • 72
  • 200
  • 340