MIME版本为1.0的php电子邮件标题
我有以下几行代码:MIME版本为1.0的php电子邮件标题,php,email,header,mime,Php,Email,Header,Mime,我有以下几行代码: $from = "email@domian.com"; $headers = "From:" . $from; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; 我需要MIME类型,因为我正在为html文件使用file\u get\u内容,我的问题是它显示为ema
$from = "email@domian.com";
$headers = "From:" . $from;
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
我需要MIME类型,因为我正在为html文件使用file\u get\u内容,我的问题是它显示为email@domain.comMIME-版本:1.0,我只想说email@domain.com如何将中的MIME类型从标题中显示出来
谢谢只需在From:标题后添加\r\n即可
$headers = "From:" . $from . "\r\n";
太棒了,拉杜,再过10分钟我就无法接受你的答案了。你的答案和之前给出的有什么不同吗。。。你也可以投票赞成
$to = "whereyousendmail@gmail.com";
$from = "email@domian.com";
$subject = "New Agent Record";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= "Reply-To: New Agent Record <email@domian.com>\r\n";
$headers .= "Return-Path:New Agent Record <email@domian.com>\r\n";
$headers .= "From: New Agent Record <email@domian.com>\r\n";
$headers .= "Organization: Your Email Subject\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n";