I'm sending a simple email using PHP mail() function in HTML content type. It works fine on every email, except Outlook, where whole content of my mail is transferred into an attachment with .dat extension. Why is it happening? Is there a way to fix it or to workaround?
I haven't found an explanation anywhere, why is it happening in so simple case. (Outlook settings are set to open emails as HTML and HTML emails sent from other websites looks fine too)
mail('myMail@gmail.com', "Testing", "First line<br>Second line <b>bolded text</b>", "From: myWebsite@mail.com\nContent-Type:".' text/html;charset="UTF-8"'."\nContent-Transfer-Encoding: 8bit");