2015-09-08 81 views
0

我正在托管我自己的网站,而不是使用常规的付费虚拟主机,并使用PHPmailer向我的用户发送通知。我想保留我的邮件进入他们的垃圾邮件文件夹。我使用我的互联网主机作为我的SMTP发送邮件和ZOHOmail来接收邮件。PHPmailier作为垃圾邮件发送

这里是发送邮件代码:

$mail = new PHPMailer; 
$mail->isSMTP();        // Set mailer to use SMTP 
$mail->Host = 'smtp-server.tampabay.rr.com'; // Specify main and backup SMTP servers 
$mail->SMTPAuth = true;       // Enable SMTP authentication 
$mail->Username = '******@tampabay.rr.com'; // SMTP username 
$mail->Password = '******';     // SMTP password 
//$mail->SMTPSecure = 'tls';     // Enable encryption, 'ssl' also accepted 
$mail->From = '[email protected]'; 
$mail->FromName = 'Pick NFL Games'; 
$mail->addReplyTo('[email protected]'); 
//$mail->addReturnPath('[email protected]'); 

// $mail->addAddress('[email protected]');    // Name is optional 
// $mail->addCC('$TE'); 
// $mail->addBCC($value); 

$mail->WordWrap = 50;         // Set word wrap to  50 characters 
$mail->isHTML(true);         // Set email format to HTML 
$mail->Subject = $subject; 

我读,我可以让SPF,但我不知道是否能与我的互联网电子邮件软管来完成。也许我应该尝试使用ZOHOmail发送。

下面是从最近的电子邮件标题:

From: Pick NFL Games <[email protected]> 
Subject: Season is fast approaching 
Date: August 27, 2015 11:30:35 PM EDT 
To:  Patrick Lewis <[email protected]> 
Reply-To: [email protected] 
Delivered-To: [email protected] 
Received-Spf: Pass (zoho.com: domain of [email protected] designates 173.169.21.54 as permitted sender using best guess) client-ip: 173.169.21.54 
Return-Path: <[email protected]> 
Return-Path: <[email protected]> 
Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.226]) by mx.zohomail.com with SMTP id 144073263762811.694320566534088; Thu, 27 Aug 2015 20:30:37 -0700 (PDT) 
Received: from [173.169.21.54] ([173.169.21.54:32798] helo=10.0.1.99) by cdptpa-oedge03 (envelope-from <[email protected]>) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id E9/20-20019-CD5DFD55; Fri, 28 Aug 2015 03:30:36 +0000 
Message-Id:  <[email protected]> 
X-Priority:  3 
X-Mailer: PHPMailer 5.2.8 (https://github.com/PHPMailer/PHPMailer/) 
Mime-Version: 1.0 
Content-Type: text/html; charset=iso-8859-1 
Content-Transfer-Encoding: 8bit 
X-Rr-Connecting-Ip:  107.14.168.142:25 
X-Cloudmark-Score: 0 
X-Zohomail:  ZRCVF-BYFANCY_1 SS_1 SFPD SFPP UW11 SFP_WHTCNT_EXT SGR4_1_11085_176 
X-Zohomail-Owner: <[email protected]>+zmo_1_<[email protected]> 
X-Zohomail-Sender: 173.169.21.54 
X-Zoho-Virus-Status: 2 
+0

更新您的PHPMailer - 您使用的是旧版本。 – Synchro

回答

1

它始终是更好地使用众所周知的SMTP服务器来解决这些问题。例如,您可以使用Gmail(它允许您通过SMTP/SSL发送电子邮件),但是如果您想从主持人发送电子邮件,则应该执行以下事项以确保您的主机不被视为垃圾邮件主机:

  • 确保您的主机不是开放中继:即匿名不能conntect其25端口,送什么东西给任何人(也有在互联网上开放中继检查引擎,使用它们)
  • 有一些有意义的反向DNS记录。您的IP应该下定决心像mx.<YOUR_EMAIL_DOMAIN>,不44.33.22.191.clients-dsl.my.local.isp.net
  • 使用SPF:你应该有v=spf1 YOUR_HOST_IP记录您的电子邮件域(YOUR_EMAIL_DOMAIN

这3个步骤,增加你的机会,从[email protected]_EMAIL_DOMAIN发送电子邮件与出得到的进入“垃圾邮件”文件夹。

有史以来,反垃圾邮件政策并不总是很清楚,所以没有100%的保证