如何使用PHP发送HTML格式的邮件 [英] How do I send HTML formatted mail using PHP
本文介绍了如何使用PHP发送HTML格式的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
mail(blah@blah.com,subject,< i> Italic Text< / i>);
刚刚显示为
< i>斜体文本< / i>
任何想法?
解决方案
你必须指定邮件的内容是HTML:
mail(blah @ blah .com,subject,< i> Italic Text< / i>,Content-type:text / html; charset = iso-8859-1);
Hey guys, trying to send a html email via mail(), however gmail just displays the email as plain text, no mark up, eg:
mail("blah@blah.com", "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("blah@blah.com", "subject", "<i>Italic Text</i>", "Content-type: text/html; charset=iso-8859-1");
这篇关于如何使用PHP发送HTML格式的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文