我可以使用什么 PHP 邮件库每天通过 Gmail 发送数百封电子邮件?
可能的重复:
如何每周发送 100.000 封电子邮件?
我正在调整注册系统供大型组织内部使用。它需要向每天注册活动的用户发送每日提醒。这个系统一开始规模很小,但现在有 300 - 600 人注册参加活动。
到目前为止,我一直在使用 php 的 mail
功能,并且效果很好。但是,他们使用 Google Apps 发送电子邮件,如果我们需要查看发送的内容,最好从专用帐户发送并引用已发送邮件文件夹。
到目前为止我的想法:
我已经测试了
PHPMailer
,它与 Google Apps 一起工作得很好,但我不相信它可以批量处理电子邮件 - 所以我认为它必须打开和关闭每封电子邮件的 SMTP 连接可能效率低下。我知道我可以编辑
php.ini
文件并将 SMTP 信息指定为 Google Apps - 这也可能是一个选项 - 但据我了解 PHP 的mail
功能实际上也不是发送大量电子邮件的最佳方式。几年前,我看过
PEAR::Mail
,我相信它在发送大量电子邮件方面做得更好,但当时我并不相信它。也许这是最好的解决方案,但我想知道是否有更新或更棒的东西。
那么,每天通过 G-Mail 从 PHP 发送多达数百封电子邮件的最佳方法是什么呢?
Possible Duplicate:
How to send 100.000 emails weekly?
I'm tweaking a registration system for internal use at a large organization. It needs to send out daily reminders to users who are registered for events each day. This system started out small but now some days there are 300 - 600 people registered for an event.
So far I've been using php's mail
function and that has worked fine. However, they are using Google Apps for their e-mail and it would be nice to send from a dedicated account and reference the sent mail folder if we need to look at what was sent out.
My thoughts so far:
I've tested
PHPMailer
and it works fine with Google Apps but I don't believe it batches e-mails - so I think it would have to open and close the SMTP connection for each e-mail which might be inefficient.I know I can edit the
php.ini
file and specify SMTP information to be Google Apps - that might be an option as well - but from what I understand PHP'smail
function is not really the best way to send large numbers of e-mails either.Years ago I looked at
PEAR::Mail
which I believe does a much better job at sending large numbers of e-mails, but I wasn't sold on it then. Maybe it is the best solution but I was wondering if something more recent or more awesome was out there.
So, are the best ways to send up to a few hundred e-mails each day via G-Mail from PHP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 SwiftMailer。
易于设置以与 Gmail 服务器一起使用。您也可以批量发送。
http://swiftmailer.org/wikidocs/v3/tutorials/batch
我用过对于发送群发电子邮件来说,它很多,效果很好。
You could use SwiftMailer.
Easy to set up for use with Gmails servers. You can do batch send as well.
http://swiftmailer.org/wikidocs/v3/tutorials/batch
I've used it a lot for sending mass emails, it works well.
您确实应该使用自己的邮件服务器来批量发送未经请求的邮件。如果您在短时间内发送过多电子邮件,gmail 等第三方服务可能会标记您的帐户邮箱并禁用它,因为这是垃圾邮件发送者所做的事情。
但实际上,您应该设置自己的 SMTP 邮件服务器并使用基于 SMTP 的 PHP 库
You should really be using your own mail server for mass-mailing of unsolicited mail. Third-party services like gmail may flag your account mailbox and disable it if you're sending too many emails in too short of a period as this is something that spammers do.
But really, you should set up your own SMTP mail server and use a SMTP-based PHP library