我想从我的网站发送HTML电子邮件,但Outlook将其标记为垃圾邮件

时间:2011-11-25 12:21:44

标签: php html email

如何让Outlook批准我的电子邮件而不将其视为垃圾邮件?

我读到它与标题有关;这是我的电子邮件标题。

Received: from smtp-in-75.livemail.co.uk (213.171.216.76) by
 exch-ht02.email.local (10.44.216.65) with Microsoft SMTP Server id
 14.1.355.2; Fri, 25 Nov 2011 12:16:47 +0000
Received: from virus_14.livemail.co.uk (virus-cluster.livemail.co.uk
 [213.171.216.10])  by smtp-in-75.livemail.co.uk (Postfix) with SMTP id
 22A126540B7    for <info@cash-access.com>; Fri, 25 Nov 2011 12:16:45 +0000 (GMT)
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
    spam_208.livemail.co.uk
X-Spam-Level: **********
X-Spam-Status: Yes, score=10.6 required=5.0 tests=FH_FROM_CASH,
    HTML_IMAGE_ONLY_12,HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,MIME_HEADER_CTYPE_ONLY,
    MIME_HTML_ONLY shortcircuit=no autolearn=disabled version=3.2.5
X-Spam-Report: *  3.0 FH_FROM_CASH From name has "cash"
    *  2.6 HTML_IMAGE_ONLY_12 BODY: HTML: images with 800-1200 bytes of words
    *  0.0 HTML_MESSAGE BODY: HTML included in message
    *  2.3 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
    *  1.0 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME
    *      headers
    *  1.7 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag
Received: from cust-smtp-193.fasthosts.net.uk (smtp-out-60.livemail.co.uk
 [213.171.216.60])  by smtp-in-165.livemail.co.uk (Postfix) with ESMTP id
 710E5EB00B9    for <info@cash-access.com>; Fri, 25 Nov 2011 12:16:40 +0000 (GMT)
Received: from linweb04.linvh1.fasthosts.co.uk (unknown [88.208.252.195])   by
 cust-smtp-193.fasthosts.net.uk (Postfix) with ESMTP id 27B5F14100A9;   Fri, 25
 Nov 2011 12:16:40 +0000 (GMT)
Received: by linweb04.linvh1.fasthosts.co.uk (Postfix, from userid 1040243723)
    id 21D2A1F609; Fri, 25 Nov 2011 12:16:40 +0000 (GMT)
To: <info@cash-access.com>
Subject: -----SPAM----- Your Pension Backed Loan Enquiry
From: <info@cash-access.com>
Content-Type: text/html
CC: <stevewolfe71@gmail.com>
Message-ID: <20111125121640.21D2A1F609@linweb04.linvh1.fasthosts.co.uk>
Date: Fri, 25 Nov 2011 12:16:40 +0000
X-Spam-Prev-Subject: Your Pension Backed Loan Enquiry
X-Original-To: info@cash-access.com
X-AntiVirus: checked by Vexira MailArmor
Return-Path: user_1040238723@linweb04.linvh1.fasthosts.co.uk
X-MS-Exchange-Organization-AuthSource: exch-ht02.email.local
X-MS-Exchange-Organization-AuthAs: Anonymous
MIME-Version: 1.0

这是我的PHP代码。

$id = $_GET['id'];
$date = date('y-m-d h:i:s');


$recipient = $_GET['email'];
$lname = $_GET['lname'];
$fname = $_GET['fname'];
$title = $_GET['title'];

    $to = $recipient; 
    $from = "info@cash-access.com"; 
    $subject = "Your Pension Backed Loan Enquiry"; 

    $message = '
<p>Dear '.$title.' '.$fname.' '.$lname.'<u></u><u></u></p>
<p><u></u></p>
<p>We have received your enquiry from Pension Backed Loans and we will be in contact with you to discuss your requirements alternatively you can call us on 01202 763339.<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>Yours sincerely<u></u><u></u></p>
<p><strong>Joanne Hearn<u></u><u></u></strong></p>
<p>Cash Access<u></u><u></u></p>
<p>7a Milburn Road<u></u><u></u></p>
<p>Westbourne<u></u><u></u></p>
<p>Bournemouth<u></u><u></u></p>
<p>Dorset BH4 9HJ<u></u><u></u></p>
<p><u></u> <u></u></p>
<p>t: <a href="tel:%2B44%280%291202%20763339" value="+441202763339" target="_blank">+44(0)1202 763339</a><u></u><u></u></p>
<p>e: <a href="mailto:info@cash-access.com" target="_blank">info@cash-access.com</a><u></u><u></u></p>
<p>w: <a href="http://www.cash-access.com/" target="_blank">www.cash-access.com</a><u></u><u></u></p>
<p><u></u> <img src="http://cash-access.com/crm/logo.png" width="288" height="72" /></p>
'; 
    $headers  = "From: $from\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 

    $headers .= "Cc: stevewolfe71@gmail.com"; 

    mail($to, $subject, $message, $headers); 

7 个答案:

答案 0 :(得分:14)

不是Outlook,而是 livemail.co.uk 的垃圾邮件过滤器,会将您的邮件标记为垃圾邮件。

它告诉你原因:

3.0 FH_FROM_CASH From name has "cash"

显然无法修复。

2.6 HTML_IMAGE_ONLY_12 BODY: HTML: images with 800-1200 bytes of words

删除图像或增加字数。

0.0 HTML_MESSAGE BODY: HTML included in message

没有影响。无需修复。

2.3 MIME_HTML_ONLY BODY: Message only has text/html MIME parts

您应始终发送多部分消息(包含非HTML版本)。 Here是一个教程。

1.0 MIME_HEADER_CTYPE_ONLY 'Content-Type' found without required MIME headers

应该通过发送正确的多部分消息来解决。

1.7 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag

添加&lt; html&gt; 标记。

领先数量(体重)越大,影响越大。

根据垃圾邮件过滤器的配置,以下内容可能会降低权重:

答案 1 :(得分:4)

您没有在标头中设置MIME类型 - 发送HTML电子邮件时,您必须将其设置为:

$headers  .= 'MIME-Version: 1.0' . "\r\n";

另外,请确保将reply-to标题与from标题相同:

$headers  .= 'Reply-To: info@cash-access.com' . "\r\n";

答案 2 :(得分:1)

试试这个:

$headers = "From:".$from . "\r\n";
    $headers .= "Reply-To: some@example.com" . "\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

答案 3 :(得分:0)

看一下在您的DNS中使用SPF记录来验证您的电子邮件服务器,这将使电子邮件更加可信,而不仅仅是查看它的内容。某些服务器(例如hotmail)会在没有它的情况下直接拒绝您的电子邮件。

答案 4 :(得分:0)

如果您在共享服务器上托管您的网站,那么您的电子邮件实际上不会来自cash-access.com,而是来自您主机的电子邮件服务器,并且将被签名。 Outlook(以及Gmail等电子邮件提供商)发现实际发件人与from地址不匹配。您需要更新SPF记录(您可以通过cPanel执行此操作,如果主机已安装它)以纠正问题。

答案 5 :(得分:0)

您的内容中的现金病毒等字词可能会将其标记为Outlook中的垃圾邮件。

答案 6 :(得分:0)

一般情况下,您需要从与电子邮件域相同的服务器发送邮件,或使用通过电子邮件域smtp服务器发送的发送命令,这在使用网络酒店时通常就是这种情况,或者如果您没有同一虚拟/物理服务器上的电子邮件服务器。 如果你没有从免费解决方案发送的smtp服务器就是制作一个gmail:http://lifehacker.com/111166/how-to-use-gmail-as-your-smtp-server