简体   繁体   English

如何处理大量电子邮件

[英]How to handle mass email

I'm about ready to unveil a "coming soon" page and one thing I need is a way for users to enter their email address for me to email once the site goes live. 我准备好发布“即将推出”页面,我需要做的一件事是让用户输入他们的电子邮件地址,以便我在网站上线后立即给我发送电子邮件。 What is the best way to do this? 做这个的最好方式是什么?

Should I store the emails in a DB and then run a PHP script to email them from my web host? 我是否应该将电子邮件存储在数据库中,然后运行PHP脚本从Web主机发送电子邮件? Should I have the emails just kind of be collected and then emailed manually by me either locally or from the server? 我应该只收集某种电子邮件,然后由我本机还是从服务器手动发送电子邮件? Is there another way I should do it? 我还有其他方法可以做到吗?

Also, are there certain web-hosts that restrain the amount of emails you can send out, thus causing a problem for mass email. 另外,是否有某些Web主机会限制您可以发送的电子邮件数量,从而导致大量电子邮件出现问题。

The only "unknown" currently is how large of a response I'll get...only time will tell. 当前唯一的“未知”是我将得到多大的回应...只有时间才能证明。

Thanks guys! 多谢你们!

Store it in the database - Yes. 将其存储在数据库中-是的。 It's no unlike storing any other piece of data. 与存储任何其他数据一样。

Mass email at once - No 立即发送大量电子邮件-否

Mass email manually (or individually mail manually) - No 手动发送大量电子邮件(或手动发送单个邮件)-否

Do some web hosts limit how many you can send at once? 是否有一些虚拟主机限制了一次发送的数量? - Yes -是的

I don't know the "best" way but I know a really good way. 我不知道“最佳”方法,但我知道一种非常好的方法。 We have built several mass emailing programs and the technique we incorporated was a throttling technique whereby we had a script that ran every three minutes and sent 20 emails at a time. 我们已经构建了几个大规模的电子邮件程序,并且我们采用的技术是一种节流技术,通过这种技术,我们每三分钟运行一次脚本,一次发送20封电子邮件。

It keeps the server from choking and the mail queue from exceeding any of our hosts' mail limits. 它可以防止服务器阻塞,并且可以防止邮件队列超出主机的任何邮件限制。

将电子邮件地址存储在数据库中,并编写批处理作业,该邮件将邮件合并到您的消息中,然后根据需要将其发送出去。

Like Eric mentioned above, another option is to use a commercial service to manage your mailing list. 像上面提到的Eric一样,另一种选择是使用商业服务来管理您的邮件列表。

I use Mailchimp ( http://www.mailchimp.com ). 我使用Mailchimp( http://www.mailchimp.com )。 They give you everything you need (signup forms, email templates, etc.), and are completely free unless your list grows to more than 500 subscribers. 它们为您提供了您所需的一切(注册表单,电子邮件模板等),并且完全免费,除非您的列表增加到500个以上的订户。

There are dozens of methods you can use for this kind of problem, but unfortunately there's no real way to pinpoint a solution for you, since there are a lot of variables. 您可以使用许多方法来解决此类问题,但是不幸的是,由于存在很多变量,因此没有真正的方法可以为您找到解决方案。

If you only get 3 responses, then you might want to just manually email the users from your email client using BCC:. 如果仅收到3条回复,则您可能只想使用BCC:从电子邮件客户端手动向用户发送电子邮件。 You've already got all the tools you need to do that, and setting up a script might be a waste of time. 您已经拥有执行此操作所需的所有工具,设置脚本可能会浪费时间。 This isn't really a great long-term solution however. 但是,这并不是一个很好的长期解决方案。

For most moderate-sized web sites you would store the emails in a database, and use a mailing script to send them out. 对于大多数中等大小的网站,您可以将电子邮件存储在数据库中,并使用邮件脚本将其发送出去。 PHPMailer is a good tool to help with getting mail sent, and you can manage a decent amount of email addresses manually. PHPMailer是一个很好的工具,可以帮助您发送邮件,并且您可以手动管理大量的电子邮件地址。 Managing addresses manually can be a bit of a pain however, as you have to deal with unsubscribe links, script timeouts, bounced email, etc. 但是,手动管理地址可能会有些麻烦,因为您必须处理退订链接,脚本超时,退回电子邮件等。

If you get up the tens of thousands of email addresses, you may want to start looking at a third-party mailing software or service that can do threaded sending. 如果您获得了成千上万的电子邮件地址,则可能要开始寻找可以进行线程发送的第三方邮件软件或服务。 Looping through and sending email to 50,000 people via a PHP script can be slow, and take hours. 通过PHP脚本循环浏览并向50,000个人发送电子邮件可能很慢,而且要花费数小时。

Basically you have to weigh the difficulty, time and cost of each method versus how much flexibility and power you think you're going to need. 基本上,您必须权衡每种方法的难度,时间和成本,以及您认为需要多少灵活性和功能。

To store emails in a db, and sending them out using a cronjob is a good way to solve the problem, if you have constrains regarding the amount of emails you're allowed to send within a period of time, you can handle it by keeping track of how many emails you've sent every time the cronjob runs. 将电子邮件存储在数据库中,然后使用cronjob发送出去是解决问题的好方法,如果您对一段时间内允许发送的电子邮件数量有限制,则可以通过保留跟踪每次cronjob运行时发送了多少电子邮件。 Also, there are open source products to do this, such as phplist http://www.phplist.com/ 另外,还有开源产品可以做到这一点,例如phplist http://www.phplist.com/

Writing the emails to a database or a text/log file are both fine ways to store the emails. 将电子邮件写入数据库或文本/日志文件都是存储电子邮件的好方法。

Depending on how many emails you receive, you may want to write a program (PHP works) to send a separate email to each person. 根据收到的电子邮件数量,您可能需要编写一个程序(PHP可以工作)以向每个人发送单独的电子邮件。 Don't send a mass email from your regular email client with everyone on a big To: line. 不要从常规电子邮件客户端发送大量电子邮件,而每个收件人都必须使用大型To:行。

There are also commercial programs that manage mailing to lists of people (probably open source ones, too). 还有一些商业程序可以管理邮件到人员列表(也可能是开源的)。 Most of those commercial ones offer a free trial period. 这些商业产品大多数都提供免费试用期。

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

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