I’m using a PHP script to email a posting to Tumblr and Posterous. For Posterous special characters are showing up in the posting but for Tumblr it don’t.
(In general Tumblr does support special character – I tried it out with emailing from Gmail)
So what could be the problem?
Here my PHP header:
$headers .= "MIME-Version: 1.0\r\n"
."Content-Type: multipart/alternative; boundary=\"PHP-mixed-$bound_text\"\r\n";
$message = "--PHP-mixed-$bound_text\r\n"
."Content-Type: multipart/related; type=\"text/html\"; boundary=PHP-mixed2-$bound_text\r\n\r\n"
."--PHP-mixed2-$bound_text\r\n"
."Content-Type: text/html; charset=\"utf-8\"\r\n"
."Content-Transfer-Encoding: 7bit\r\n\r\n";
I already tried several charsets and Content-Transfer-Encoding combinations without any different result.
Any ideas are welcome.
Michael
I looked into how my GMail account sent it and found out it used
windows-1252for the charset and the text is base64 encoded (this may not be case in using other GMail accounts). The email I sent below was successfully posted by tumblr and I used the function utf8_decode to generate the correct base64 string.The raw email message is below:
I used my omime class to send the email and here’s the code I used: