I have been using a very simple PHP function to construct HTML / plain-text emails. It worked well in gmail and many other clients I saw.
As it turns out, @live.com accounts don't get to see the email content at all.
Here's the relevant code:
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with
$headers = "From: server@example.com
Reply-To: server@example.com
";
$headers .= "MIME-Version: 1.0
";
//add boundary string and mime type specification
$headers .= "Content-Type: multipart/alternative; boundary=$random_hash
";
$headers .= "Content-Transfer-Encoding: 7bit
";
//define the body of the message.
$message = "This is a MIME encoded message.
" .
"--$random_hash
" .
"Content-Type: text/plain; charset=utf-8
" .
//"Content-Transfer-Encoding: 7bit
" .
"
this is plain text.
" .
"--$random_hash
" .
"Content-Type: text/html; charset=utf-8
" .
//"Content-Transfer-Encoding: 7bit
" .
"
<html><body>this is wonderful <b>HTML</b> text.</body></html>" .
"
--$random_hash--
";
mail('someAddress@live.com', 'This is u umlaut: ü', $message, $headers);
If I only send either HTML or plain-text, it will display properly.
Any ideas?
I do not want to use an extra library. All I need the HTML for is links, basically. The answers on PHP Multi-Part Text/HTML showing blank don't help me.
And btw: the u umlaut is displayed incorrectly in the email list in the live.com inbox but displayed correctly when I open the email in live.com...