邮件转到php邮件功能的垃圾邮箱

时间:2017-04-05 10:01:31

标签: php phpmailer

我正在使用php邮件功能发送邮件,我正在使用godaddy的共享主机(很多域名),我正在使用以下代码。

$to ="mani.s@wikreatemedia.com";
$subject= "simple test";
$message ="my name is singh";
$headers = "From: myplace@wikreate.in\r\n";
$headers .= "Reply-To: myplace2@wikreate.in\r\n";
$headers .= "Return-Path: myplace@wikreate.in\r\n";
$headers .= "CC: sombodyelse@example.com\r\n";
$headers .= "BCC: hidden@example.com\r\n";
if ( mail($to,$subject,$message,$headers) ) {
   echo "The email has been sent!";
   } else {
  echo "The email has failed!";
 }

这是邮件日志

            Return-Path: <wicare@sg2plcpnl0153.prod.sin2.secureserver.net>
            Delivered-To: mani.s@wikreatemedia.com
            Received: from us2.mx.mailhostbox.com ([172.16.214.29])
            by mss17.mailhostbox.aus-tx.colo (Dovecot) with LMTP id tYCwNeK85FiHFQAAxGpCKA
            for <mani.s@wikreatemedia.com>; Wed, 05 Apr 2017 09:47:26 +0000
            Received-SPF: None (no SPF record) identity=mailfrom; client-  ip=182.50.132.200; helo=sg2nlsmtp01.shr.prod.sin2.secureserver.net; envelope-from=wicare@sg2plcpnl0153.prod.sin2.secureserver.net; receiver=mani.s@wikreatemedia.com 
            Received: from sg2nlsmtp01.shr.prod.sin2.secureserver.net (sg2nlsmtp01.shr.prod.sin2.secureserver.net [182.50.132.200])
            (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
            (No client certificate requested)
            by us2.mx.mailhostbox.com (Postfix) with ESMTPS id 0D75B300232
            for <mani.s@wikreatemedia.com>; Wed,  5 Apr 2017 09:47:25 +0000 (GMT)
            Received: from sg2plcpnl0153.prod.sin2.secureserver.net ([43.255.152.15])
            by : HOSTING RELAY : with SMTP
            id vhVRcTa5iweyCvhVRc2Bw8; Wed, 05 Apr 2017 02:45:37 -0700
            Received: from wicare by sg2plcpnl0153.prod.sin2.secureserver.net with local (Exim 4.87)
            (envelope-from <wicare@sg2plcpnl0153.prod.sin2.secureserver.net>)
            id 1cvhWB-00275t-P8; Wed, 05 Apr 2017 02:46:23 -0700
            To: abc@thepresidencyhotel.in
            Subject: Enquiry From Presidency api
            X-PHP-Script: wikreate.in/wikreate/presidencyapi/booknow.php for   122.177.57.204
            MIME-Version: 1.0
            Content-type:text/html;charset=iso-8859-1
            From: Nitish <tiwarypatna.96@gmail.com>
            Message-Id: <E1cvhWB-00275t-P8@sg2plcpnl0153.prod.sin2.secureserver.net>
            Date: Wed, 05 Apr 2017 02:46:23 -0700
            X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
            X-AntiAbuse: Primary Hostname - sg2plcpnl0153.prod.sin2.secureserver.net
            X-AntiAbuse: Original Domain - wikreatemedia.com
            X-AntiAbuse: Originator/Caller UID/GID - [2459384 215] / [47 12]
            X-AntiAbuse: Sender Address Domain - sg2plcpnl0153.prod.sin2.secureserver.net
            X-Get-Message-Sender-Via: sg2plcpnl0153.prod.sin2.secureserver.net: authenticated_id: wicare/only user confirmed/virtual account not confirmed
            X-Authenticated-Sender: sg2plcpnl0153.prod.sin2.secureserver.net: wicare
            X-Source: 
            X-Source-Args: /usr/sbin/proxyexec -q -d -s /var/lib/proxyexec/cagefs.sock/socket /bin/cagefs.server 
            X-Source-Dir: wikreate.in:/public_html/wikreate/presidencyapi
            X-CMAE-Envelope: MS4wfMRQ7kSJ8KWdx4itTHIjwisCrsBAakbBvt1OZ2yFPuFeOXdKUnda6IitvHoEaNxUwhgpYqEzzmJYzPeqRcrL6IAXSscpkCpv9Gu8WJX4hNsKaAMMCkaJ
            goZSEMn/6GyLYBpDNx8gW55kxrf4sWb/1P56wpu9eO8G3yeDF3wjkXoXAWN4zqemwDOA+x015Y/y3Er0sVdVYtpjdu5I6ikHheqMn4N2rWXFPkYo5fjaMFGH
            AqRWIbQ41vSoi6RORE/KkQ==
            X-Spam-Status: Yes
            X-CMAE-Score: 100
            X-CMAE-Analysis: v=2.2 cv=Id33YSia c=0 sm=1 tr=0
            p=vcK47+ICuhThKJHMN6jHbg==:17 a=ZoDhRiop4GmRtm87OYDT7A==:117

            <strong>You have received a new message</strong><br><br><strong>Name :</strong>  'Nitish'<br><br><strong>Email :</strong>  'tiwarypatna.96@gmail.com'<br><br><strong>Phone No :</strong>  '7503749637'<br><br><strong>Checkin date :</strong>  '04/05/17'<br><br><strong>Checkout date :</strong>  '04/06/17'<br><br><strong>Adults :</strong>  '1'<br><br><strong>Children :</strong>  '1'<br><br><strong>Room :</strong>  'Standard Room'<br><br><strong>Price :</strong>  '2133'<br><br><strong>Description :</strong>  'Our superior rooms reflect the ambience of a private urban residence with amenities of the finest five-star hotels. The superior rooms reflect the ambience of a private urban residence with amenities of the finest five-star hotels. We provide a superior room which is exquisitely furnished in an elegant, cosmopolitan, modern style. They are superior to deluxe Rooms and are one of the largest and the most luxurious accommodations in the hotel. The rooms include high ceilings addi
            ng to the roomy feel.

            Room features

            sq ft of contemporary space
            King/Twin bed
            Complimentary Breakfast
            High-speed Internet with LAN and Wi-Fi
            40-inch LED television with DVD player
            Parquet flooring
            City/Pool view
            Walk-in Closet
            Mini-bar, Writing Desk, Electronic Safe and Tea/Coffee Maker
            Twice-daily housekeeping service with complimentary packaged water
            Hair dryer
            Bathroom with Shower Cubical and luxurious amenities
            '

请告诉我在哪里做错了。我阅读了太多文章并将其实施到我的邮件中但是没有积极的回应,与godady的支持团队交谈但是响应也是负面的,尽管我已经添加了spf txt记录。

2 个答案:

答案 0 :(得分:1)

简答

使用像PHPMailer这样的smgp服务器,如SendGrid,MailChimp,TotalSend,MailGun,SES等。

长答案

这是因为mail默认情况下不使用SMTP服务器发送邮件,而是使用发送域后面的计算机作为权威服务器。

在过去几年中,电子邮件垃圾邮件过滤器在通过Postfix / sendmail作为MTA(邮件传输代理)发送电子邮件方面变得更加严格。

这产生了对事务性邮件服务的需求,例如SendGrid,MailChimp,TotalSend,MailGun,SES等。

他们提供的最大区别是他们的IP没有被阻止,他们确保维护发送指南,以避免成为垃圾邮件网络的一部分。

答案 1 :(得分:0)

标题信息量不大,但看起来好像不喜欢您的内容 - 您的邮件未通过垃圾邮件检查。

Scott Kitterman's site验证您的SPF设置。

从GoDaddy发送也是一种失败的策略 - 许多垃圾邮件过滤器将所有IP范围列入黑名单,因为它们拥有如此多的垃圾邮件。

您正在设置返回路径标头 - 不要这样做,这不是发件人的工作。

通常,您不能简单地绕过垃圾邮件过滤器,而且他们没有责任。如果可以的话,它们就不会是垃圾邮件过滤器。