在新闻通讯模块中发送大量电子邮件

发布于 2024-10-06 13:31:11 字数 87 浏览 2 评论 0原文

我正在 php/mysql 中编写新闻通讯模块。

如何向网站订阅者发送电子邮件而不导致我的邮件服务器被阻止?我的意思是它不被视为垃圾邮件发件人?

i am writing a newsletter module in 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?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

养猫人 2024-10-13 13:31:11

这个问题的完整答案确实超出了本网站的范围,因为其中大部分内容将涉及涉及域和服务器的管理任务。

但简短的回答是:不要这样做!您最终只会将服务器的 IP 列入黑名单,从而使从该服务器发送的少量电子邮件变得毫无价值。

您应该考虑其他选择; RSS 提要、运行良好的第三方邮件服务(如 Constant Contact)或其他东西。

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.

You should look at other options; an RSS feed, a third-party, well-run mailing service (like Constant Contact), or something else.

比忠 2024-10-13 13:31:11

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

Use Cron job to do this and send mails in small chunks with a time difference.

撩发小公举 2024-10-13 13:31:11

如果您想从您的网站发送电子邮件并且不被标记为垃圾邮件,则需要遵循几条规则:

  1. 从最明显的开始:检查以确保您的服务器的 IP 地址不在任何网络上垃圾邮件黑名单。试试这个网站:链接文本

  2. 默认情况下,从 Apache 服务器上托管的网站发送的所有电子邮件均来自Apache 服务器运行的用户,通常是“nobody”。这是垃圾邮件过滤器的危险信号,因此您必须修改“return-path”标头的值,而电子邮件服务器并不总是允许该值。如果您无法修改返回路径,那么您需要以另一个用户身份启动 apache,为您的 apache 服务器创建一个新帐户,将其命名为您喜欢的任何名称,只要它不是“nobody”,然后将 apache 服务器配置为运行这个新用户

  3. 拥有用于发送电子邮件的 IP 地址的反向 DNS 条目非常重要。该反向 DNS 条目必须指向与该 IP 地址相同的域名。这实际上是最重要的事情。由于只有网络主机可以添加反向 DNS 条目,因此您应该要求主机为您执行此操作。

其他可以提供帮助的较小步骤是在 DNS 服务器中配置适当的 spf 条目,另一个步骤是使用数字签名对所有传出消息进行签名。我曾经使用一个名为 dksign 的程序来执行此操作,它可能不是现在最新的程序,因此请进行研究并找到对消息进行签名的最佳方法。

创建主题行时使用常识。如果您在主题行中说“免费折扣优惠”或类似内容或“获取伟哥”,则无论如何您的消息都可能会被标记为垃圾邮件。

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. 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'. 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

  3. Very important to have reverse DNS entry for the IP address you use for sending out emails. That reverse DNS entry must point to same domain name that points to this IP address. 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.

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. 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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文