我正在托管我自己的网站,而不是使用常规的付费虚拟主机,并使用PHPmailer向我的用户发送通知。我想让我的邮件不要进入他们的垃圾邮件文件夹。我使用我的互联网主机作为我的SMTP来发送邮件和ZOHOmail来接收邮件。
以下是发送邮件的代码:
$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 = 'webmaster@picknflgames.com';
$mail->FromName = 'Pick NFL Games';
$mail->addReplyTo('webmaster@picknflgames.com');
//$mail->addReturnPath('webmaster@picknflgames.com');
// $mail->addAddress('webmaster@picknflgames.com'); // 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 <webmaster@picknflgames.com>
Subject: Season is fast approaching
Date: August 27, 2015 11:30:35 PM EDT
To: Patrick Lewis <patrick@patricklewis.net>
Reply-To: webmaster@picknflgames.com
Delivered-To: patrick@patricklewis.net
Received-Spf: Pass (zoho.com: domain of webmaster@picknflgames.com designates 173.169.21.54 as permitted sender using best guess ) client-ip: 173.169.21.54
Return-Path: <webmaster@picknflgames.com>
Return-Path: <webmaster@picknflgames.com>
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 <webmaster@picknflgames.com>) (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: <a0634c40fd39d8be6126636437ceda96@10.0.1.99>
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: <a0634c40fd39d8be6126636437ceda96@10.0.1.99>+zmo_1_<webmaster@picknflgames.com>
X-Zohomail-Sender: 173.169.21.54
X-Zoho-Virus-Status: 2
答案 0 :(得分:1)
最好使用众所周知的SMTP服务器来解决此类问题。例如,您可以使用Gmail(它允许您通过SMTP / SSL发送电子邮件),但如果您想从主机发送电子邮件,则应该执行以下操作以确保您的主机不被视为垃圾邮件主机:
mx.<YOUR_EMAIL_DOMAIN>
,而不是44.33.22.191.clients-dsl.my.local.isp.net
v=spf1 YOUR_HOST_IP
个记录(YOUR_EMAIL_DOMAIN
)这3个步骤增加了您从some_user@YOUR_EMAIL_DOMAIN
发送电子邮件的机会,而不会进入垃圾邮件&#34;文件夹中。
但是,反垃圾邮件政策并不总是很明确,所以没有100%保证