In this quick article we will see how we can set/use Unicode characters in email subject with PHP.
Here I am referring to characters which includes all possible characters, Here are few examples which are very tough to get into email subject. Example: ❤, ★, etc. There are many more unicode characters available, full list can be found here.
So if you try to send all these characters in email subject in simple way then 99.99% you will end up with junk characters in email subject. I have mentioned 99.99% because some email client understand what we want to achieve and it correct our mistake. :)
Now let’s look at the tricky code snippet which enable us to send Unicode characters in email subject with PHP.
So, I am done with my article, let me know if you have any suggestion/comments/questions on this trick/article.
Avinash Zala currently working at a leading web development company as a Sr. PHP Web Developer. He is the founder of the Xpert Developer. He has completed B.E. in Information Technology. Born and brought up in Ahmedabad. He loves to code and coding is all about passion for him. Follow him on twitter at Avinash Zala & Xpert Developer.
View all posts by: Avinash