Special Characters in email subject – PHP

December 6, 2010 § Leave a comment

I am sure there is a lot of articles talking about how to handle special character in email subject.

Lately, I need to add French word like “è” such special character in the email subject.

So I googled it, generally there are few things to look at.

1. Use “=?UTF-8?B?”.base64_encode($your_subject).”?=”

2. Make sure your source is UTF-8, such as your script, your database source

3. Use UTF-8 encoding email library such as Swiftmailer , this is the rock star in open source email, unbeatable.

And that’s all about it.

Oh you can also use it in the `From Name` like Josè <abc@abc.com> !

Advertisements

Tagged: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Special Characters in email subject – PHP at Nick Wan L.K..

meta

%d bloggers like this: