我正在使用sendmail通过php发送一大堆电子邮件(不幸的是,我真的必须发送这些电子邮件)。当我停止使用我的域SMTP服务器,并开始使用服务器的sendmail工具时,电子邮件就开始进入gmail和yahoo的垃圾邮件箱中(我将我的域名提供商与我的主机分开,现在的主机是Amazon)。
经过一些学习,我意识到我可以通过身份验证发送电子邮件(即通过我的域的SMTP服务器)来解决这个问题。我可以通过sendmail中的配置来实现吗?这样,我就不需要对我的应用程序进行任何更改,只需要对我的服务器基础设施进行更改。
我收到的标题(来自gmail的一封电子邮件)
Delivered-To: ***********@gmail.com
Received: by 10.227.152.2 with SMTP id e2cs188839wbw;
Fri, 29 Oct 2010 03:39:45 -0700 (PDT)
Received: by 10.100.13.16 with SMTP id 16mr263366anm.209.1288348783979;
Fri, 29 Oct 2010 03:39:43 -0700 (PDT)
Return-Path: <apache@ip-10-194-150-64.ec2.internal>
Received: from ip-10-194-150-64.ec2.internal (ec2-75-101-144-206.compute-1.amazonaws.com [75.101.144.206])
by mx.google.com with ESMTP id x32si2412082vcr.72.2010.10.29.03.39.43;
Fri, 29 Oct 2010 03:39:43 -0700 (PDT)
Received-SPF: neutral (google.com: 75.101.144.206 is neither permitted nor denied by best guess record for domain of apache@ip-10-194-150-64.ec2.internal) client-ip=75.101.144.206;
Authentication-Results: mx.google.com; spf=neutral (google.com: 75.101.144.206 is neither permitted nor denied by best guess record for domain of apache@ip-10-194-150-64.ec2.internal) smtp.mail=apache@ip-10-194-150-64.ec2.internal
Received: from ip-10-194-150-64.ec2.internal (localhost [127.0.0.1] (may be forged))
by ip-10-194-150-64.ec2.internal (8.13.8/8.13.8) with ESMTP id o9TAdhxQ017836
for <*************e@gmail.com>; Fri, 29 Oct 2010 06:39:43 -0400
Received: (from apache@localhost)
by ip-10-194-150-64.ec2.internal (8.13.8/8.13.8/Submit) id o9TAdhHk017833;
Fri, 29 Oct 2010 06:39:43 -0400
Date: Fri, 29 Oct 2010 06:39:43 -0400
Message-Id: <201010291039.o9TAdhHk017833@ip-10-194-150-64.ec2.internal>
To: ***********@gmail.com
Subject: Esqueci minha senha
From: Cidade dos Bicos <*****************@cidadedosbicos.com.br>
X-Mailer: Cidade dos Bicos
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit谢谢
发布于 2010-11-10 00:13:03
进一步参考:我的所有问题都是由于DNS条目配置不正确造成的。当您决定发送电子邮件时,MX、mx CNAME、PTR、DKIM等术语应该留在您的血管中。
这是一个很好的参考:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html
发布于 2010-10-31 14:31:46
不,这不是真正的问题,它都是关于标题的,如果你发送了正确的标题附加到邮件中,如果你没有真正地发送垃圾邮件,你就不会最终进入垃圾邮件箱;)
编辑:
下面是一个站点,介绍了什么标题以及如何设置它们的http://www.transio.com/content/how-pass-spam-filters-php-mail
发布于 2010-10-31 18:02:14
下面的代码在过去对我很有效。试一试,让我知道。
$to = "someguy@gmail.com";
$subject ="Howdy Pardner?";
$message="I'm riding west, join me";
$headers = 'From: me@philar.com' . "\n" .
'Reply-To: me@philar.com' . "\n" .
'Content-Type: text/html; charset="utf-8"' . "\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message,$headers);https://stackoverflow.com/questions/4062073
复制相似问题