这是一个棘手的问题,我一直依赖于技术,比如基于许可的电子邮件(即只发送给你有权发送的人),而不是公然使用垃圾邮件术语。

最近,我以编程方式发送的一些电子邮件开始被自动转移到别人的垃圾邮件文件夹中,我不知道该怎么办。

尽管这些特定的电子邮件并不是人类会标记为垃圾邮件的,具体来说,它们是包含许可密钥的电子邮件,人们已经花了很多钱购买,所以我不认为他们会认为它们是垃圾邮件

我认为这是一个很大的话题,在这个话题上我基本上是一个无知的傻瓜。


当前回答

使用电子邮件认证方法,如SPF和DKIM,以证明您的电子邮件和您的域名属于一起,并防止欺骗您的域名。SPF网站包含一个向导,用于为您的网站生成DNS信息。

检查反向DNS,以确保邮件服务器的IP地址指向用于发送邮件的域名。

请确保您正在使用的ip地址不在黑名单上

确保回复地址是有效的现有地址。

在“收件人”字段中使用收件人的真实全名,而不仅仅是电子邮件地址(例如。“John Smith”<john@blacksmiths-international.com>)。

监视您的滥用帐户,如abuse@yourdomain.example和postmaster@yourdomain.example。这意味着-确保这些账户存在,阅读发送给他们的内容,并对投诉采取行动。

最后,让退订变得非常容易。否则,你的用户会通过按垃圾邮件按钮退订,这将影响你的声誉。

也就是说,让Hotmail接受你的电子邮件仍然是一种魔法。

其他回答

除了所有其他答案外,如果您发送的HTML电子邮件包含URL作为链接文本,请确保URL与链接文本匹配。我知道雷鸟会自动将他们标记为骗局。

错误的方式:

Go to your account now: <a href="http://www.paypal.com.phishers-anonymous.org/">http://www.paypal.com</a>

正确的做法:

Go to your account now: <a href="http://www.yourdomain.org/">http://www.yourdomain.org</a>

或者使用不相关的链接文本代替URL:

<a href="http://www.yourdomain.org/">Click here to go to your account</a>

以下是之前回答中的几个要点:

Most important: Does the sender address ("From") belong to a domain that runs on the server you send the E-Mail from? If not, make it so. Never use sender addresses like xxx@gmail.com. User reply-to if you need replies to arrive at a different address. Is your server on a blacklist (e.g. check IP on spamhaus.org)? This is a possibility when you're on shared hosting when neighbours behave badly. Are mails filtered by a spam filter? Open an account with a freemailer that has a spam folder and find out. Also, try sending mail to an address without any spam filtering at all. Do you possibly need the fifth parameter "-f" of mail() to add a sender address? (See mail() command in the PHP manual) If you have access to log files, check those, of course. Do you check the "from:" address for possible bounce mails ("Returned to sender")? You can also set up a separate "errors-to" address.

我的一个应用程序的电子邮件经常被标记为垃圾邮件。它是带有单个链接的HTML,我在正文中用text/ HTML内容类型将其作为HTML发送。

我对这个问题最成功的解决方法是编写电子邮件,让它看起来像是由电子邮件客户端生成的。

我将电子邮件更改为多部分/替代mime文档,现在我生成文本/纯文本和文本/html部分。

电子邮件不再被outlook检测为垃圾。

你能做的最重要的事情是确保你要发送电子邮件的人在收到你的电子邮件时不太可能点击“垃圾邮件”按钮。所以,请遵循以下经验法则:

Make sure you have permission from the people you are sending email to. Don't ever send email to someone who did not request it from you. Clearly identify who you are right at the top of each message, and why the person is receiving the email. At least once a month, send out a reminder email to people on your list (if you are running a list), forcing them to opt back in to the list in order to keep receiving communications from you. Yes, this will mean your list gets shorter over time, but the up-side is that the people on your list are "bought in" and will be less likely to flag your email. Keep your content highly relevant and useful. Give people an easy way to opt out of further communications. Use an email sending service like SendGrid that works hard to maintain a good IP reputation. Avoid using short links - these are often blacklisted.

遵循这些经验法则将大有裨益。

要允许DMARC检查SPF通过,并在使用sendmail时进行对齐,请确保将信封发件人地址(-f或-r参数)设置为与From:报头地址中的域匹配的内容。

PHP:

使用PHP内置的mail()函数而不设置第5个参数将导致DMARC SPF检查不对齐。默认情况下,sendmail将以web服务器的用户RFC5321发送电子邮件。MailFrom / Return路径头。

例如,假设您在host.com web服务器上托管您的网站domain.com。如果您不设置附加参数参数:

mail($to,$subject,$message,$headers); // Wrong way

电子邮件收件人将收到一封带有以下邮件标题的电子邮件:

Return-Path: <your-website-user@server.host.com>
From: <your-website-user@domain.com>

即使这通过了SPF检查,它也将是不对齐的(因为domain.com和host.com不匹配),这意味着DMARC SPF检查将失败为不对齐。

相反,你必须通过包含PHP mail()函数中的第5个参数将信封发件人地址传递给sendmail,例如:

mail($to,$subject,$message,$headers, '-r bounce_email@domain.com'); // Right way

在这种情况下,电子邮件收件人将收到一封带有以下邮件标题的电子邮件:

Return-Path: <bounce_email@domain.com>
From: <your-website-user@domain.com>

由于这两个报头都包含来自domain.com的地址,因此SPF将通过并对齐,这意味着DMARC也将通过SPF检查。