send PHP mail with Content-Type: multipart/alternative
I am trying to send a multipart mail that contains both html and plain text. This is also one of the ways to get through spam filters and to allow more people to read the mail in case of not supporting HTML. After spending long hours googling, I have found some examples. I made my code, which sends the mail but it displays the text with the html tags, code, string etc. <?php $boundary=md5(uniqid(rand())); $header .= "From:My Name<something@something.com>\n"; $header .= "Reply-To: something@something.com \n"; $header .= 'MIME-Version: 1.0'."\r\n"; $header .= 'Content-type: multipart/alternative