无法通过(php)发送邮件中的html功能 [英] not able to send html in mail function via ( php )

查看:89
本文介绍了无法通过(php)发送邮件中的html功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 mail()函数中有问题

我无法在<$ c $中发送html c> mail()函数通过(php)

i can't send html in mail() function via ( php )

我使用以下语句:

 $headers .= "MIME-Version: 1.0\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\n";


推荐答案

您必须指定 Content-在您的电子邮件标题中键入:multipart / mixed 以替换消息内容类型。

You must specify Content-Type: multipart/mixed in your email headers for alternate message content types.

$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; "\n\n";

这篇关于无法通过(php)发送邮件中的html功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆