Trying to send a html email via mail(), however gmail just displays the email as plain text, no mark up, eg:
mail("[email protected]", "subject", "<i>Italic Text</i>");
just appears as
<i>Italic Text</i>
Any ideas?
You have to specify that the contents of the mail is HTML:
mail("[email protected]", "subject", "<i>Italic Text</i>", "Content-type: text/html; charset=iso-8859-1");
See example 4 on this page:
http://php.net/manual/en/function.mail.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With