php 邮件列表 - 注意事项和潜在的陷阱?
我的客户需要在他们的网站上有一个邮件列表。 这个想法是用户可以订阅以获取新闻通讯或公告。 我希望该列表包含数百个用户,而不是数万个。
我以前没有这样做过(只有一条消息,例如“感谢您注册”) 我最初的想法是通过 1 个 mail() 调用将每条消息发送给所有用户, 对每个用户使用密件抄送或使用循环单独发送。 但后来有朋友提到可能是服务器阻塞邮件的问题 包含 1000 个密件抄送以及页面超时,阻止上述循环完全执行。
还有其他问题需要考虑吗? 有什么可能的解决方案吗? 我应该使用 PHPList、Swiftmail 等工具来 phpmailer 吗?
提前感谢:-)
my client needs a mailing list in their site.
the idea is that users can subscribe to get newsletters or announcements.
i expect the list to contains hundreds of users, not tens of thousands.
i have not done this before (only single messages like "thank you for registering")
my initial idea was sending each message to all users in 1 mail() call,
using BCC for each user or sending it separately using a loop.
but then a friend mentioned the possible problem of the server blocking a mail
containing 1000 bcc's and also the a page timeout preventing the above mentioned loop from being fully executed.
are there any other issues to consider?
any possible solutions?
should i use tools like PHPList, Swiftmail to phpmailer?
thanx in advance :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您使用现有的邮件列表程序。它们有很多,有免费的也有其他的,而且它们已经存在很长时间了。大多数问题已经解决了,也即将解决了——解决它们是没有用的。
如果您在自己的服务器上运行此程序,您最大的担忧之一将是被标记为垃圾邮件发送者。相关的,但其本身也是一个问题,是让您的电子邮件服务器和 DNS 条目绝对正确。您会经常遇到电子邮件无法到达某一特定电子邮件地址或某一特定域的问题。您会发现您已被medium_sized_isp.com 阻止,因为您没有设置SPF 记录或类似的东西。换句话说,除了编程任务之外,这样做还需要许多系统管理任务和问题。请务必进行相应的讨论/签订合同/开具账单。
I suggest you use an existing mailing list program. There are a bunch of them out there, free and otherwise, and they've been around a long time. Most of the problems are solved as well as they're going to be solved - there's no use resolving them.
If you're running this on your own server, one of your biggest concerns will be getting flagged as a spammer. Related, but also a concern in its own right, is having your email server and dns entries absolutely correct. You will constantly face issues where email does not get to one particular email address or one particular domain. You'll find you've been blocked by medium_sized_isp.com because you don't have an SPF record set up or something like that. In other words, doing this will entail a number of system administration tasks and issues in addition to programming tasks. Be sure to discuss/contract/bill accordingly.
如果您负担得起,Mailchimp 之类的东西可能是您的最佳选择。他们将为您处理您的列表,以及格式化所涉及的细节,当然还有所有技术方面。
If you can afford it, something like Mailchimp may be your best option. They'll handle your list for you, as well as the nitty-gritty involved in formatting, and of course all the technical side.
在纯粹的技术层面上,PEAR 有一个名为 Mail_Queue 的模块,它非常适合这样的事情。每个收件人都会收到一条直接发送给他们的消息。这样做的好处之一是您可以在消息中插入跟踪变量、个性化等。
On a purely technical level, PEAR has a module called Mail_Queue which is good for things like this. Each recipient gets a message sent directly to them. One advantage of doing it that was is you can insert tracking variables, personalization, etc. into the message.