我有一个发送电子邮件的PHP脚本。它在Yahoo或其他个人服务器上运行正常,但在gmail上,我什么都收不到。在垃圾邮件文件夹中都没有。
我应该添加哪些标题?
我正在使用mail()函数。
$clientSubject = "Rays : programare confirmata!";
$clientMessage = "Buna " . $clientName . ", am inregistrat programarea ta. \n Te asteptam la Rays!";
$clientHeaders = 'MIME-Version: 1.0' . "\n" .
'From: "Rays" <private>' . "\n" .
'Reply-To: private' . "\n" .
'X-Mailer: PHP/' . phpversion(). "\n".
'Content-type: text/html; charset=iso-8859-1' . "\n";
mail($emailClient, $clientSubject, $clientMessage, $clientHeaders);
这是我得到的错误:
SMTP error from remote mail server after end of data:
host alt1.gmail-smtp-in.l.google.com [173.194.71.27]:
550-5.7.1 [93.114.40.228 12] Our system has detected that this message is
550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail,
550-5.7.1 this message has been blocked. Please visit
550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for
550 5.7.1 more information. dj3si2836476lac.55 - gsmtp
------ This is a copy of the message, including all the headers. ------
Return-path: <@server.host28.net>
Received: from rays by server.host28.net with local (Exim 4.82)
(envelope-from <@server.host28.net>)
id 1X9fy5-0002AO-Sz
for private@gmail.com; Tue, 22 Jul 2014 22:43:21 +0300
To: private@gmail.com
Subject: Rays : programare confirmata!
X-PHP-Script: private/scheduler/checkForNewResponses.php for 92.83.242.133
From: "Rays" <private>
Reply-To: private
X-Mailer: PHP/5.3.28
Content-type: text/html; charset=iso-8859-1
Message-Id: <E1X9fy5-0002AO-Sz@server.host28.net>
Date: Tue, 22 Jul 2014 22:43:21 +0300
答案 0 :(得分:0)
简短回答:
Gmail已阻止您的服务器IP!