vineri, 26 aprilie 2013

Email subject UTF-8 encoded

I haven't encountered this yet, i've always been able to send email messages WITH utf-8 correctly encoded and displayed characters (umlauts, acutes), but i've also met this technique which renders good results too:
Set your subject's encoding (or another header directive's) like this:
'=?utf-8?B?'.base64_encode($subject).'?='

That means your subject needs to look like:
=?ENCODING?B?base64_encoded_data?=

Pretty easy

Display php email sent subject characters displayed correctly, umlauts.

Niciun comentariu:

Trimiteți un comentariu