简体   繁体   English

在简报模块中发送大量电子邮件

[英]sending a lot of email in newsletter module

i am writing a newsletter module in php/mysql. 我正在写php / mysql中的新闻稿模块。

how can i send email to site subscriptors that doesn't cause my mail server get blocked ? 如何发送电子邮件到不会导致我的邮件服务器被阻止的网站下标? i mean it doesn't treat as a spam sender? 我的意思是它不会被视为垃圾邮件发件人?

The full answer to this question is really outside of the scope of this site, as much of it will involve administrative tasks with the domain and server(s) involved. 这个问题的完整答案实际上超出了本网站的范围,因为其中很多都涉及涉及域和服务器的管理任务。

But the short answer is: Don't do this! 但简短的回答是:不要这样做! You will just end up getting your server's IP blacklisted, making even low-volume e-mail sending worthless from that server. 您最终会将服务器的IP列入黑名单,从而使得从该服务器发送的低容量电子邮件变得毫无价值。

You should look at other options; 你应该看看其他选择; an RSS feed, a third-party, well-run mailing service (like Constant Contact), or something else. RSS提要,第三方,运行良好的邮件服务(如Constant Contact)或其他内容。

使用Cron作业执行此操作并以小块发送具有时差的邮件。

There are several rules that you need to follow if you want to send out emails from your site and have then not being flagged as spam: 如果您希望从您的网站发送电子邮件,然后不将其标记为垃圾邮件,则需要遵循以下几条规则:

  1. Start with the most obvious: check to make sure IP address of your server is not on any spam black lists. 从最明显的开始:检查以确保您的服务器的IP地址不在任何垃圾邮件黑名单上。 Try this site: link text 试试这个网站: 链接文字

  2. By default all emails sent from a website hosted on Apache server are send from the user Apache server runs under, usually 'nobody'. 默认情况下,从Apache服务器上托管的网站发送的所有电子邮件都是从Apache服务器运行的用户发送的,通常是“nobody”。 This is a red flag for spam filters, so you have to modify the value of 'return-path' header which is not always allowed by email server. 这是垃圾邮件过滤器的红色标记,因此您必须修改“返回路径”标头的值,电子邮件服务器并不总是允许这样做。 If you can't modify return-path, then you need to start apache as another user, create a new account for your apache server, name it anything you like as long as it's not 'nobody' and then configure apache server to run as this new user 如果您无法修改返回路径,那么您需要以另一个用户身份启动apache,为您的apache服务器创建一个新帐户,只要它不是'nobody'就可以命名它,然后将apache服务器配置为运行为这个新用户

  3. Very important to have reverse DNS entry for the IP address you use for sending out emails. 对于用于发送电子邮件的IP地址进行反向DNS输入非常重要。 That reverse DNS entry must point to same domain name that points to this IP address. 反向DNS条目必须指向指向此IP地址的相同域名。 This is actually the most important thing to do. 这实际上是最重要的事情。 Since only a webhost can add reverse DNS entry, you should ask your host to do this for you. 由于只有虚拟主机可以添加反向DNS条目,因此您应该让主机为您执行此操作。

Other smaller steps that can help is to configure an appropriate spf entry in your DNS server and another one is to use digital signature to sign all your outgoing messages. 其他较小的步骤可以帮助您在DNS服务器中配置适当的spf条目,另一个是使用数字签名来签署所有外发邮件。 I used to use a program called dksign for this, it's probably not the most up-to date program now, so do your research and find the best way to sign your messages. 我曾经使用过一个名为dksign的程序,它现在可能不是最新的程序,所以你的研究工作并找到签署你的消息的最佳方式。

Use common sense when creating subject lines. 创建主题行时使用常识。 If you say "free discount offer" in the subject line or something similar or "get viagra", your message will probably be flagged as spam no matter what. 如果您在主题行或类似的内容中说“免费折扣优惠”或“get viagra”,则无论如何,您的邮件都可能被标记为垃圾邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM