Php 如何以html格式发送提交的表单数据?
在这里,我有正确的工作代码,将提交的表格数据发送到电子邮件,工作正常, 但我想在我的电子邮件中接收html格式的提交数据, 我该怎么做? 范例Php 如何以html格式发送提交的表单数据?,php,forms,Php,Forms,在这里,我有正确的工作代码,将提交的表格数据发送到电子邮件,工作正常, 但我想在我的电子邮件中接收html格式的提交数据, 我该怎么做? 范例 最佳解决方案:使用并查看他们的各种示例。如果您仍然希望继续使用代码,则需要修改并添加内容类型: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'From: '.$em
最佳解决方案:使用并查看他们的各种示例。如果您仍然希望继续使用代码,则需要修改并添加内容类型:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: '.$email_from."\r\n";
$headers .= 'Reply-To: '.$email_from."\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: '.$email_from."\r\n";
$headers .= 'Reply-To: '.$email_from."\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();