It’s been a hectic few months – the web development consultancy is going well with several new web app prototypes/platforms released in the last few months, a new plugin (Social Gallery for WordPress) is being well received (and even imitated already!) and amongst all that ChooseFest has had some interesting developments. Also I am now a year older. Anyway enough with the stereotypical excuses for lack of blogging, here’s a snippet-size-little blog post with a little should-of-been-obvious fix for sending emails out of php in interesting character sets e.g. Japanese, sometimes its the most ridiculously simple stuff that catches you out!
Traditional and SMTP emails out of php’s main mail() function will often be ignored, it seems, by Hotmail (and sometimes yahoo) if the email contains character without specific mention of the correct character set. It’s irritating as every other carrier seems to just deal with it but Hotmail (and sometimes yahoo) just act like no email ever existed, there’s no bounce-back, no spam folder message – just nothing.
In any case, set the header of your email to contain the character set, and if the email your sending is html then make sure you include that in the email body meta, seems obvious but is annoyingly easy to forget.
e.g. Add this line to whatever headers you are using:
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
Comments Archive
Hi there. This is my old blog and it's archived, so you can no longer post new comments on this post (Hotmail and Character Sets: Make Sure Your Emails Get There).
Read my new blog about writing software and stories at WoodyHayday.com