我使用以下代码从网站发送电子邮件。但问题是,收到的电子邮件有一些奇怪的电子邮件地址p3plcpnl0291.prod.phx3.secureserver.net 下午10:45(6分钟前)而不是info@huzup.com
我收到的邮件:
info@huzup.com来自p3plcpnl0291.prod.phx3.secureserver.net 下午10:45(6分钟前)
到stargijo 喂
代码:
<?php
$to = 'stargijo@gmail.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: info@huzup.com' . "\r\n" .
'Reply-To: info@huzup.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
获得标题
To: stargijo@gmail.com
Subject: the subject
X-PHP-Script: www.huzup.com/mailer.php for 111.92.126.41
From: info@huzup.com
Reply-To: info@huzup.com
X-Mailer: PHP/5.4.26
Message-Id: <E1WbYrv-0004uM-Eb@p3plcpnl0291.prod.phx3.secureserver.net>
Date: Sat, 19 Apr 2014 10:15:59 -0700
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - p3plcpnl0291.prod.phx3.secureserver.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [386330 956] / [47 12]
X-AntiAbuse: Sender Address Domain - p3plcpnl0291.prod.phx3.secureserver.net
X-Get-Message-Sender-Via: p3plcpnl0291.prod.phx3.secureserver.net: authenticated_id: stargijo/from_h
X-Source:
X-Source-Args: /usr/sbin/proxyexec -q -d -s /var/run/proxyexec/cagefs.sock/socket /bin/cagefs.server
X-Source-Dir: huzup.com:/public_html
hello
答案 0 :(得分:0)
请试试这个mailheader
$mailheaders = "From: noreply@test.com\r\n";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$mailheaders .= "Bcc: reports@test.com\r\n";
希望这有帮助!