php批量邮件限制
我需要向潜在客户发送约 20k 封电子邮件,并且需要最好的方法来避免:
- 服务器崩溃
- 被放入垃圾邮件发送者列表中
我搜索了一些论坛,人们说最好以 1k 包的形式发送邮件 但我的问题是我应该设置发送每个 1k 之间的延迟是多少?我的意思是 1k/天或 1k/小时或 1k/分钟等。
I need to send about ~20k emails to potential clients and need the best way to avoid:
- server crash
- being put in spammers list
I've searched a few forums and people said it's best to send mails in 1k packages
but my question is what delay between sending each 1k should I set? I mean 1k/day or 1k/hour or 1k/min etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(5)
我认为你的 1K 东西是转移注意力的东西。有很多类似的问题都有很好的答案,看看这些:
请注意,避免邮件被标记为垃圾邮件的首要要求是不要发送垃圾邮件。您的描述听起来很像垃圾邮件,在这种情况下,再多的巧妙技巧也无济于事。
如果您实际上没有发送垃圾邮件,请选择专业组织,例如 http://www.campaignmonitor.com/或 http://www.mailchimp.com/ 可能比您需要的时间便宜正确地执行此操作。
当涉及到被放入垃圾邮件发送者列表时,问题是来自同一发件人的有多少(非常)相似的邮件到达某个主机。如果您在短时间内用数千封邮件淹没雅虎邮件帐户,那么您肯定很快就会出现在他们的列表中。
您可以做什么:付费请专业服务人员为您寄出邮件。他们通常与大型提供商签订合同,这样您就不会被列入任何人的黑名单(不过,这会花费您金钱)。
如果您从服务器发送它们,请确保“反向 DNS 查找”你的服务器已激活 - 我不知道是否再检查过,但这曾经给我带来了困难。
如果您的邮件不需要在某个时间发出,我会以很小的包裹发送邮件,例如每秒不超过一封邮件,连续发送的邮件不会太多。然后等待一定的时间,重复,直到所有邮件都发送完毕。
我以前工作的一家公司,发送的邮件不会超过 200 封,然后等待半个小时,程序才会继续。据我所知,我们从未被列入黑名单。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我最近必须构建系统才能做到这一点,这是我们选择的解决方案:
1-管理系统设置电子邮件并将其存储在数据库中。
2- 我们在邮件服务器上设置了一个无回复帐户以获取退回邮件。
3-我们在伟大的邮件库 swiftmailer (swiftmailer.org) 上构建了一个小代码。
4- 我们通过 cron 运行我们构建的脚本,并以每分钟 50 封的包发送邮件(如果同一分钟内从同一地址/服务器发送了太多电子邮件,hotmail 很可能会将电子邮件标记为垃圾邮件)。我们将每个 swiftId 存储在邮件数据库中
5- 在邮件发送脚本运行时,我们检查无回复邮箱中的退回邮件或其他错误,并相应地在邮件表中标记我们的邮件(状态:1 - 成功,2 - 无效电子邮件,3 - 退回)
6- 当数据有状态并且最后一次更改至少在过去 10 分钟之前进行时,我们会在主系统中同步数据(在用户访问系统的该部分时),以限制更改系统中的状态。 (同步脚本可以改变主系统中某个项目的状态,但10分钟的延迟降低了改变的风险)
I recently had to build system to do so, here is the solution we chose :
1- The management system setup emails and store them in a database.
2- We setup a no-reply account on our mail server to get the bounces back.
3- We build a small code over the great mailing library swiftmailer (swiftmailer.org).
4- We run the script we build through a cron and send mails in packages of 50 per minute (hotmail will most likely flag email as spam if too much emails are sent from the same adresse/server in the same minute). We store each swiftId i the mail database
5- At the runtime of the mail sending script we check for bounces or other errors in our no-reply mailbox and flag our messages in our mail table accordingly (status : 1 - success, 2 - invalid email, 3 - bounces)
6- We sync back our data (upon user accessing the section of the system) in the main system when they have a status and that the last change was made at least 10 minutes in the past to limit the change of states in the system. (the synchronisation script can change the status of an item in the main system, but the 10 minutes delay reduce the risk of changes)