电子邮件在 SPF 等之后仍然落入垃圾邮件;为什么?

发布于 2025-01-19 17:14:21 字数 16342 浏览 1 评论 0原文

我已经使用phpmailer自动化了PHP中电子邮件的发送:

$mail->isSMTP();

$mail->SMTPAuth = true;

$mail->Host = $host; // verified with my host 
$mail->Port = 465;

$mail->Username = '[email protected]'; // verified with my host 
$mail->Password = 'mypassword'; // verified with my host 

$mail->SMTPSecure = 'ssl';

$mail->SMTPAutoTLS = true;
$mail->setFrom( '[email protected]', 'This is the Header of the E-Mail' );
$mail->addAddress( '[email protected]', '' );
$mail->isHTML( true );
$mail->Subject = 'This is the Subject of the E-Mail';
$mail->CharSet = 'UTF-8';
$mail->Body = 'HTML Content of the E-Mail';
$mail->send();
$mail->SmtpClose();

首先,许多通过此脚本发送的电子邮件落入了我的客户邮件中。我与主机签了检查,他们帮助我添加了一个SPF记录:

  • 类型:TXT
  • TTL:300
  • 值:“ V = SPF1 REDIRECT = shared_host_mail_server”

这使非SPAM交付率大大提高了很多,但对于Gmail来说,尤其是重要的,部分仍然掉入垃圾邮件中。掉入电子邮件垃圾邮件中的电子邮件源的一个示例是:

Delivered-To: [email protected]
Received: by 2002:a17:906:f12:0:0:0:0 with SMTP id secret;
        Mon, 21 Mar 2022 06:58:32 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJz6F29tChwOYHMaPAlJC0D9QTnj/JMhktHDZEuWjHBWU7x/ZdnkZS7MccoMwSxrMjrZec73
X-Received: by 2002:a5d:4ad2:0:b0:203:d56d:9c82 with SMTP id secret;
        Mon, 21 Mar 2022 06:58:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1647871110; cv=none;
        d=google.com; s=arc-20160816;
        b=K3FgBLtaiFZEsUAPiR2dBpquBEVEKZ2A82PhG+nCN7I7NRTxE8KDueotg3pndOeoQQ
         IaCxIO8uYvkka1BmdSz8RuL0H/+OuXh+UMTpuy5tnhteTy3IR5Ub8vfl2eCl5AsCUj1R
         ZLkysapUMphblFlZnSz4JObVz0jgN8P4uAE39ObN1YVpLZ9bT//BXuVjyYbKuHyhDUoP
         AnZ+cjey7I4dyuvaaUWyrIMC7xEnLratGSN4mtIBWhEuWrMokXZtnbVZMHtNh+W7d5d1
         HGmWzWdnWftGZJFI8e2fnNSRosRE0pwzblCNAkGd+PmJHOEDlq5pmaLla1I9yZpxZa3z
         dx4w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:message-id:subject:from:to
         :date;
        bh=NCbhFSalLdDA2HAK57ps0Gy6VG+hTVJz6G8PW0XPkpo=;
        b=TuIDSDjGMJOISTWTkb8iaOA1qJ3QYFLU6adhuG2kbyzpICBc0EC5MNvkGDWcEH9znp
         UjYJ0Uug/79c6ZSzLaXuv3THIwuO7MJTuM5r7YXTbFvGnwNlO/Qc1xO/bo63rIN1ZS8y
         aKRtpzjO0hMqjxlbltnZPcNice0DqZZcX0BlaU8kkgKFGw96vpBj9A0ZZbAyvmK2Lyws
         oGYdKUmcOhosxXIxM8AAu1JVtM0bI2EncDo5UvwBIXVitvgcmORTfS1u3RBsKakk9tXI
         bBCer6hxpjjn+hRxMOsdjqFdLa0EIIxnuW/z05Yh4CYSPBi1RZM0q/hWCMPvjDqBRFY5
         8vVQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of [email protected] designates 2a00:d70:0:e::313 as permitted sender) [email protected]
Return-Path: <[email protected]>
Received: from host_out_mail_server (host_out_mail_server. [2a00:d70:0:e::313])
        by mx.google.com with ESMTPS id secret
        for <[email protected]>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 21 Mar 2022 06:58:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates secret_ip as permitted sender) client-ip=secret_ip;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [email protected] designates [email protected] as permitted sender) [email protected]
Received: from [10.0.2.46] (helo=host_mail_server) by host_out_mail_server with esmtps
  (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2 (FreeBSD)) (envelope-from <[email protected]>) id 1nWIYH-0000QW-8D for [email protected]; Mon, 21 Mar 2022 14:58:29 +0100
Received: from other_host_server ([2a00:d70:0:b::2:10] helo=example.com) by host_mail_server with esmtpa (Exim 4.95 (FreeBSD)) (envelope-from <[email protected]>) id 1nWIYG-00010j-7w for [email protected]; Mon, 21 Mar 2022 14:58:29 +0100
X-Authenticated-Sender-Id: [email protected]
Date: Mon, 21 Mar 2022 13:58:28 +0000
To: [email protected]
From: Werbe - Anfrage <[email protected]>
Subject: Bekanntmachung
Message-ID: <[email protected]>
X-Mailer: PHPMailer 6.5.0 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks"
Content-Transfer-Encoding: 8bit

--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html lang=3D"de" xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:o=3D"urn:sch=
emas-microsoft-com:office:office">
<head>
  <meta charset=3D"UTF-8">
  <meta name=3D"viewport" content=3D"width=3Ddevice-width,initial-scale=3D1=
">
  <meta name=3D"x-apple-disable-message-reformatting">
  <title></title>
  <!--[if mso]>
  <style type=3D"text/css">
        table {border-collapse:collapse;border:0;border-spacing:0;margin:0;=
}
        div, td {padding:0;}
        div {margin:0 !important;}
    </style>
    <noscript>
        <xml>
            <o:OfficeDocumentSettings>
                <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
    </noscript>
    <![endif]-->
  <style type=3D"text/css">
    /* CLIENT-SPECIFIC STYLES */
    body,
    table,
    td,
    a {
      -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
    }

    table,
    td {
      mso-table-lspace: 0pt;
      mso-table-rspace: 0pt;
    }

    img {
      -ms-interpolation-mode: bicubic;
    }

    /* RESET STYLES */
    img {
      border: 0;
      height: auto;
      line-height: 100%;
      outline: none;
      text-decoration: none;
    }

    table {
      border-collapse: collapse !important;
    }

    body {
      height: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
    }

    /* iOS BLUE LINKS */
    a[x-apple-data-detectors] {
      color: inherit !important;
      text-decoration: none !important;
      font-size: inherit !important;
      font-family: inherit !important;
      font-weight: inherit !important;
      line-height: inherit !important;
    }

    /* MOBILE STYLES */
    @media screen and (max-width: 600px) {
      .img-max {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
      }

      .max-width {
        max-width: 100% !important;
      }

      .mobile-wrapper {
        width: 85% !important;
        max-width: 85% !important;
      }

      .mobile-padding {
        padding-left: 5% !important;
        padding-right: 5% !important;
      }
    }

    /* ANDROID CENTER FIX */
    div[style*=3D"margin: 16px 0;"] {
      margin: 0 !important;
    }
  </style>

</head>

<body style=3D"margin: 0 !important; padding: 0; !important; word-spacing: =
normal; background-color: #ffffff;" bgcolor=3D"#ffffff">

<div style=3D"display: none; font-size: 1px; color: #fefefe; line-height: 1=
px; font-family: Open Sans, Helvetica, Arial, sans-serif; max-height: 0px; =
max-width: 0px; opacity: 0; overflow: hidden;">
    This is the text of the preheader
</div>

<table role=3D"presentation" border=3D"0" cellpadding=3D"0" cellspacing=3D"=
0" width=3D"100%" bgcolor=3D"#d3d3d3" style=3D"background: #d3d3d3;">
    <tr>
        <td align=3D"center" valign=3D"top" width=3D"100%" style=3D"padding=
: 0;">

            <!--[if (gte mso 9)|(IE)]>
            <table role=3D"presentation" align=3D"center" border=3D"0" cell=
spacing=3D"0" cellpadding=3D"0" width=3D"600">
            <tr>
            <td align=3D"center" valign=3D"top" width=3D"600">
            <![endif]-->

            <table role=3D"presentation" align=3D"center" border=3D"0" cell=
padding=3D"0" cellspacing=3D"0" width=3D"100%" style=3D"max-width:600px;">
                <tr>
    <td align=3D"center" valign=3D"top" style=3D"padding: 0; border-left: 1=
px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid=
 #000000;">
        <img src=3D"https://example.com/mail_visual.png" wi=
dth=3D"600" border=3D"0" alt=3D"" style=3D"display: block; width: 100%; hei=
ght:auto;" class=3D"img-max"/>
    </td>
</tr>

                <tr>
    <td align=3D"left" valign=3D"top" bgcolor=3D"#ffffff" style=3D"backgrou=
nd: #ffffff; padding: 15px 30px 30px 30px; font-family: Open Sans, Helvetic=
a, Arial, sans-serif; border-left: 1px solid #000000; border-right: 1px sol=
id #000000;">
        <h4 style=3D"font-family: Open Sans, Helvetica, Arial, sans-serif; =
font-size: 17px; line-height: 23px; color: #000000;">Salutation</h4>
        <p style=3D"color: #000000; font-family: Open Sans, Helvetica, Aria=
l, sans-serif; font-size: 16px; line-height: 22px; margin: 0;">Sample Context</p>
    </td>
</tr>

                <tr>
    <td align=3D"center" valign=3D"top" bgcolor=3D"#13aff0" style=3D"backgr=
ound: #13aff0; padding: 10px 30px; font-family: Open Sans, Helvetica, Arial=
, sans-serif; border-left: 1px solid #000000; border-right: 1px solid #0000=
00; border-top: 1px solid #000000;">

      <h5 style=3D"font-family: Open Sans, Helvetica, Arial, sans-serif; fo=
nt-size: 16px; line-height: 24px; color: #ffffff; margin:0 0 5px 0;">Domai=
n</h5>
      <img src=3D"https://example.com/icons/first.png" width=3D"107" he=
ight=3D"40" border=3D"0" alt=3D"first" style=3D"display: bl=
ock; border: 0px; color: #999999; font-family: sans-serif; font-size: 18px;=
" />
      <p style=3D"margin:7px 0 15px 0;"><a href=3D"mailto:secret.sender=
@example.com" target=3D"_blank" style=3D"text-decoration: none; color: #fff=
fff; font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 16px;=
 line-height: 16px;">[email protected]</a></p>
      <p style=3D"margin:0 0 14px 0;"><a href=3D"https://example.com" targe=
t=3D"_blank" style=3D"text-decoration: none; color: #ffffff; font-family: O=
pen Sans, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 16px;=
">www.example.com</a></p>

      <!--[if (gte mso 9)|(IE)]>
      <table role=3D"presentation" align=3D"center" border=3D"0" cellspacin=
g=3D"0" cellpadding=3D"0" width=3D"157">
      <tr>
      <td align=3D"center" valign=3D"top" width=3D"157">
      <![endif]-->

      <table role=3D"presentation" align=3D"center" border=3D"0" cellpaddin=
g=3D"0" cellspacing=3D"0" width=3D"100%" style=3D"max-width:157px;">
        <tr>
          <td style=3D"padding:0;">
            <a href=3D"https://www.instagram.com/companylink/" target=3D"_blank=
" style=3D"text-decoration: none;"><img src=3D"https://example.com/icons/In=
stagram.png" alt=3D"Link for Instagram Channel" width=3D"30" height=
=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 15px;">
            <a href=3D"https://www.linkedin.com/company/name" target=3D"=
_blank" style=3D"text-decoration: none;"><img src=3D"https://example.com/ic=
ons/LinkedIn.png" alt=3D"Link for LinkedIn Channel" width=3D"30" he=
ight=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 15px;">
            <a href=3D"https://twitter.com/companyname" target=3D"_blank" style=
=3D"text-decoration: none;"><img src=3D"https://example.com/icons/Twitter.p=
ng" alt=3D"Link for Twitter Channel" width=3D"30" height=3D"30" sty=
le=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 7px;">
            <a href=3D"https://www.facebook.com/compnyname" ta=
rget=3D"_blank" style=3D"text-decoration: none;"><img src=3D"https://domai=
n.com/icons/Facebook.png" alt=3D"Link for Facebook Channel" width=
=3D"30" height=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
        </tr>
      </table>

      <!--[if (gte mso 9)|(IE)]>
      </td>
      </tr>
      </table>
      <![endif]-->

    </td>
</tr>

            </table>

            <!--[if (gte mso 9)|(IE)]>
            </td>
            </tr>
            </table>
            <![endif]-->

        </td>
    </tr>
  </table>
</body>

--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks
Content-Type: application/octet-stream; name=QR_DE.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=QR_DE.pdf


--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks--

我看不到此电子邮件源提取物中的问题 /原因是它掉入垃圾邮件中的原因;有人吗?

然后,我与主机一起检查了有关特定Gmail问题的回复,他们建议我将我的SPF记录更改为:

“ v = spf1包括:_spf.google.com redirect = sharone_host_mail_server_server”

但我觉得那是这是错误的 /只有在您想通过Gmails Server的域发送电子邮件,还是我错了?

无论如何,关于如何改善结果的任何建议?到目前为止,我不使用DKIM / DMARC,因为我的主机不支持DKIM签名。在这种情况下,尝试通过phpmailer实现DKIM是一个好主意 /如果主机服务器不支持DKIM,是否可以这样做?

在此先感谢您的任何帮助!

PS:我做过此测试,结果是:

对于SPF的两个版本,这都适用于。但是,如果我检查其他工具作为邮件tester或酸上的电子邮件,SPF是有效的。只有fyi

I've automated the sending of my e-mails in PHP using PHPMailer:

$mail->isSMTP();

$mail->SMTPAuth = true;

$mail->Host = $host; // verified with my host 
$mail->Port = 465;

$mail->Username = '[email protected]'; // verified with my host 
$mail->Password = 'mypassword'; // verified with my host 

$mail->SMTPSecure = 'ssl';

$mail->SMTPAutoTLS = true;
$mail->setFrom( '[email protected]', 'This is the Header of the E-Mail' );
$mail->addAddress( '[email protected]', '' );
$mail->isHTML( true );
$mail->Subject = 'This is the Subject of the E-Mail';
$mail->CharSet = 'UTF-8';
$mail->Body = 'HTML Content of the E-Mail';
$mail->send();
$mail->SmtpClose();

First, many emails sned via this script dropped into the SPAM of my clients. I checked back with the host, and they helped me to add an SPF record:

  • Type: TXT
  • TTL: 300
  • Value: "v=spf1 redirect=shared_host_mail_server"

This improved the non-spam delivery rate a lot, but especially for gmail, significant portion still drops into spam. An example of the source of an email that dropped into the email spam is:

Delivered-To: [email protected]
Received: by 2002:a17:906:f12:0:0:0:0 with SMTP id secret;
        Mon, 21 Mar 2022 06:58:32 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJz6F29tChwOYHMaPAlJC0D9QTnj/JMhktHDZEuWjHBWU7x/ZdnkZS7MccoMwSxrMjrZec73
X-Received: by 2002:a5d:4ad2:0:b0:203:d56d:9c82 with SMTP id secret;
        Mon, 21 Mar 2022 06:58:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1647871110; cv=none;
        d=google.com; s=arc-20160816;
        b=K3FgBLtaiFZEsUAPiR2dBpquBEVEKZ2A82PhG+nCN7I7NRTxE8KDueotg3pndOeoQQ
         IaCxIO8uYvkka1BmdSz8RuL0H/+OuXh+UMTpuy5tnhteTy3IR5Ub8vfl2eCl5AsCUj1R
         ZLkysapUMphblFlZnSz4JObVz0jgN8P4uAE39ObN1YVpLZ9bT//BXuVjyYbKuHyhDUoP
         AnZ+cjey7I4dyuvaaUWyrIMC7xEnLratGSN4mtIBWhEuWrMokXZtnbVZMHtNh+W7d5d1
         HGmWzWdnWftGZJFI8e2fnNSRosRE0pwzblCNAkGd+PmJHOEDlq5pmaLla1I9yZpxZa3z
         dx4w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:message-id:subject:from:to
         :date;
        bh=NCbhFSalLdDA2HAK57ps0Gy6VG+hTVJz6G8PW0XPkpo=;
        b=TuIDSDjGMJOISTWTkb8iaOA1qJ3QYFLU6adhuG2kbyzpICBc0EC5MNvkGDWcEH9znp
         UjYJ0Uug/79c6ZSzLaXuv3THIwuO7MJTuM5r7YXTbFvGnwNlO/Qc1xO/bo63rIN1ZS8y
         aKRtpzjO0hMqjxlbltnZPcNice0DqZZcX0BlaU8kkgKFGw96vpBj9A0ZZbAyvmK2Lyws
         oGYdKUmcOhosxXIxM8AAu1JVtM0bI2EncDo5UvwBIXVitvgcmORTfS1u3RBsKakk9tXI
         bBCer6hxpjjn+hRxMOsdjqFdLa0EIIxnuW/z05Yh4CYSPBi1RZM0q/hWCMPvjDqBRFY5
         8vVQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of [email protected] designates 2a00:d70:0:e::313 as permitted sender) [email protected]
Return-Path: <[email protected]>
Received: from host_out_mail_server (host_out_mail_server. [2a00:d70:0:e::313])
        by mx.google.com with ESMTPS id secret
        for <[email protected]>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 21 Mar 2022 06:58:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates secret_ip as permitted sender) client-ip=secret_ip;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [email protected] designates [email protected] as permitted sender) [email protected]
Received: from [10.0.2.46] (helo=host_mail_server) by host_out_mail_server with esmtps
  (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2 (FreeBSD)) (envelope-from <[email protected]>) id 1nWIYH-0000QW-8D for [email protected]; Mon, 21 Mar 2022 14:58:29 +0100
Received: from other_host_server ([2a00:d70:0:b::2:10] helo=example.com) by host_mail_server with esmtpa (Exim 4.95 (FreeBSD)) (envelope-from <[email protected]>) id 1nWIYG-00010j-7w for [email protected]; Mon, 21 Mar 2022 14:58:29 +0100
X-Authenticated-Sender-Id: [email protected]
Date: Mon, 21 Mar 2022 13:58:28 +0000
To: [email protected]
From: Werbe - Anfrage <[email protected]>
Subject: Bekanntmachung
Message-ID: <[email protected]>
X-Mailer: PHPMailer 6.5.0 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks"
Content-Transfer-Encoding: 8bit

--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
<html lang=3D"de" xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:o=3D"urn:sch=
emas-microsoft-com:office:office">
<head>
  <meta charset=3D"UTF-8">
  <meta name=3D"viewport" content=3D"width=3Ddevice-width,initial-scale=3D1=
">
  <meta name=3D"x-apple-disable-message-reformatting">
  <title></title>
  <!--[if mso]>
  <style type=3D"text/css">
        table {border-collapse:collapse;border:0;border-spacing:0;margin:0;=
}
        div, td {padding:0;}
        div {margin:0 !important;}
    </style>
    <noscript>
        <xml>
            <o:OfficeDocumentSettings>
                <o:PixelsPerInch>96</o:PixelsPerInch>
            </o:OfficeDocumentSettings>
        </xml>
    </noscript>
    <![endif]-->
  <style type=3D"text/css">
    /* CLIENT-SPECIFIC STYLES */
    body,
    table,
    td,
    a {
      -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
    }

    table,
    td {
      mso-table-lspace: 0pt;
      mso-table-rspace: 0pt;
    }

    img {
      -ms-interpolation-mode: bicubic;
    }

    /* RESET STYLES */
    img {
      border: 0;
      height: auto;
      line-height: 100%;
      outline: none;
      text-decoration: none;
    }

    table {
      border-collapse: collapse !important;
    }

    body {
      height: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
    }

    /* iOS BLUE LINKS */
    a[x-apple-data-detectors] {
      color: inherit !important;
      text-decoration: none !important;
      font-size: inherit !important;
      font-family: inherit !important;
      font-weight: inherit !important;
      line-height: inherit !important;
    }

    /* MOBILE STYLES */
    @media screen and (max-width: 600px) {
      .img-max {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
      }

      .max-width {
        max-width: 100% !important;
      }

      .mobile-wrapper {
        width: 85% !important;
        max-width: 85% !important;
      }

      .mobile-padding {
        padding-left: 5% !important;
        padding-right: 5% !important;
      }
    }

    /* ANDROID CENTER FIX */
    div[style*=3D"margin: 16px 0;"] {
      margin: 0 !important;
    }
  </style>

</head>

<body style=3D"margin: 0 !important; padding: 0; !important; word-spacing: =
normal; background-color: #ffffff;" bgcolor=3D"#ffffff">

<div style=3D"display: none; font-size: 1px; color: #fefefe; line-height: 1=
px; font-family: Open Sans, Helvetica, Arial, sans-serif; max-height: 0px; =
max-width: 0px; opacity: 0; overflow: hidden;">
    This is the text of the preheader
</div>

<table role=3D"presentation" border=3D"0" cellpadding=3D"0" cellspacing=3D"=
0" width=3D"100%" bgcolor=3D"#d3d3d3" style=3D"background: #d3d3d3;">
    <tr>
        <td align=3D"center" valign=3D"top" width=3D"100%" style=3D"padding=
: 0;">

            <!--[if (gte mso 9)|(IE)]>
            <table role=3D"presentation" align=3D"center" border=3D"0" cell=
spacing=3D"0" cellpadding=3D"0" width=3D"600">
            <tr>
            <td align=3D"center" valign=3D"top" width=3D"600">
            <![endif]-->

            <table role=3D"presentation" align=3D"center" border=3D"0" cell=
padding=3D"0" cellspacing=3D"0" width=3D"100%" style=3D"max-width:600px;">
                <tr>
    <td align=3D"center" valign=3D"top" style=3D"padding: 0; border-left: 1=
px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid=
 #000000;">
        <img src=3D"https://example.com/mail_visual.png" wi=
dth=3D"600" border=3D"0" alt=3D"" style=3D"display: block; width: 100%; hei=
ght:auto;" class=3D"img-max"/>
    </td>
</tr>

                <tr>
    <td align=3D"left" valign=3D"top" bgcolor=3D"#ffffff" style=3D"backgrou=
nd: #ffffff; padding: 15px 30px 30px 30px; font-family: Open Sans, Helvetic=
a, Arial, sans-serif; border-left: 1px solid #000000; border-right: 1px sol=
id #000000;">
        <h4 style=3D"font-family: Open Sans, Helvetica, Arial, sans-serif; =
font-size: 17px; line-height: 23px; color: #000000;">Salutation</h4>
        <p style=3D"color: #000000; font-family: Open Sans, Helvetica, Aria=
l, sans-serif; font-size: 16px; line-height: 22px; margin: 0;">Sample Context</p>
    </td>
</tr>

                <tr>
    <td align=3D"center" valign=3D"top" bgcolor=3D"#13aff0" style=3D"backgr=
ound: #13aff0; padding: 10px 30px; font-family: Open Sans, Helvetica, Arial=
, sans-serif; border-left: 1px solid #000000; border-right: 1px solid #0000=
00; border-top: 1px solid #000000;">

      <h5 style=3D"font-family: Open Sans, Helvetica, Arial, sans-serif; fo=
nt-size: 16px; line-height: 24px; color: #ffffff; margin:0 0 5px 0;">Domai=
n</h5>
      <img src=3D"https://example.com/icons/first.png" width=3D"107" he=
ight=3D"40" border=3D"0" alt=3D"first" style=3D"display: bl=
ock; border: 0px; color: #999999; font-family: sans-serif; font-size: 18px;=
" />
      <p style=3D"margin:7px 0 15px 0;"><a href=3D"mailto:secret.sender=
@example.com" target=3D"_blank" style=3D"text-decoration: none; color: #fff=
fff; font-family: Open Sans, Helvetica, Arial, sans-serif; font-size: 16px;=
 line-height: 16px;">[email protected]</a></p>
      <p style=3D"margin:0 0 14px 0;"><a href=3D"https://example.com" targe=
t=3D"_blank" style=3D"text-decoration: none; color: #ffffff; font-family: O=
pen Sans, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 16px;=
">www.example.com</a></p>

      <!--[if (gte mso 9)|(IE)]>
      <table role=3D"presentation" align=3D"center" border=3D"0" cellspacin=
g=3D"0" cellpadding=3D"0" width=3D"157">
      <tr>
      <td align=3D"center" valign=3D"top" width=3D"157">
      <![endif]-->

      <table role=3D"presentation" align=3D"center" border=3D"0" cellpaddin=
g=3D"0" cellspacing=3D"0" width=3D"100%" style=3D"max-width:157px;">
        <tr>
          <td style=3D"padding:0;">
            <a href=3D"https://www.instagram.com/companylink/" target=3D"_blank=
" style=3D"text-decoration: none;"><img src=3D"https://example.com/icons/In=
stagram.png" alt=3D"Link for Instagram Channel" width=3D"30" height=
=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 15px;">
            <a href=3D"https://www.linkedin.com/company/name" target=3D"=
_blank" style=3D"text-decoration: none;"><img src=3D"https://example.com/ic=
ons/LinkedIn.png" alt=3D"Link for LinkedIn Channel" width=3D"30" he=
ight=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 15px;">
            <a href=3D"https://twitter.com/companyname" target=3D"_blank" style=
=3D"text-decoration: none;"><img src=3D"https://example.com/icons/Twitter.p=
ng" alt=3D"Link for Twitter Channel" width=3D"30" height=3D"30" sty=
le=3D"height:auto;display:block;border:0;" /></a>
          </td>
          <td style=3D"padding:0 0 0 7px;">
            <a href=3D"https://www.facebook.com/compnyname" ta=
rget=3D"_blank" style=3D"text-decoration: none;"><img src=3D"https://domai=
n.com/icons/Facebook.png" alt=3D"Link for Facebook Channel" width=
=3D"30" height=3D"30" style=3D"height:auto;display:block;border:0;" /></a>
          </td>
        </tr>
      </table>

      <!--[if (gte mso 9)|(IE)]>
      </td>
      </tr>
      </table>
      <![endif]-->

    </td>
</tr>

            </table>

            <!--[if (gte mso 9)|(IE)]>
            </td>
            </tr>
            </table>
            <![endif]-->

        </td>
    </tr>
  </table>
</body>

--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks
Content-Type: application/octet-stream; name=QR_DE.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=QR_DE.pdf


--b1_ciluFWHutVghcyNH2SHrnSBIhFM0AuGhsYu8JefeYks--

I don't see the problem in this e-mail source extract / the reason why it drops into spam; does anyone of you?

I then checked back with the host about the particular gmail problem, and they recommended me to change my spf record to:

"v=spf1 include:_spf.google.com redirect=shared_host_mail_server"

But I feel that this is wrong / is only necessary if you want to send emails from your domain across gmails server's, or am I wrong?

Anyway, any suggestions on how I can improve the result? I don't use DKIM / DMARC so far, because my host does not support DKIM signing. Is it a good idea to try to implement DKIM via PHPMailer in this case / is it even possible to do so if the host server does not support DKIM natively?

Thanks in advance for any help!

P.S.: I did this test and the result was:

enter image description here

This goes for both mentioned versions of the SPF. However if I check in other tools as mail-tester or email on acid, the SPF is valid. Just FYI

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文