我有一个代码来发送邮件,代码工作正常,邮件发送
但是我从一个地址收到了邮件
我收到的邮件来自star1231@a2plcpnl0005.prod.iad2.secureserver.net
我的代码:
$from = 'From: System@dmworld24.com';
if (!sendMail($_POST['mail'], $text['EMAIL_RECOVER_MSG_SUBJECT'], $text['EMAIL_RECOVER_MSG'], $from))
发送邮件功能:
function sendMail ($to, $subject, $msg, $from, $add = null) {
$from = array($from,
"Reply-To: system@dmworld24.com",
"X-Mailer: PHP/" . PHP_VERSION
);
$from = implode("\r\n", $headers);
return mail($to, $subject, $msg, $from);
}
答案 0 :(得分:1)
从变量{"methods":["PUT","POST"]}
From:
从
改变$from
向
$from = 'From: System@dmworld24.com';
建议使用PHPMailer类。