PHP:发送批量的电子邮件数量巨大 [英] PHP: Sending huge quantity of emails in batch

查看:474
本文介绍了PHP:发送批量的电子邮件数量巨大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

暂且不论从垃圾营销的不屑,我需要15000左右的电子邮件发送给客户。我的同事曾试图通过PHP的邮件循环给他们,但显然它得到迅速卡住。有一个传统的(通过PHP脚本即)迅速做到这一点?如果没有,你怎么认为我没有太多的开销,这样做(也许通过 EXEC )?

Putting aside the disdain from junk marketing I need to send around 15,000 emails to customers. My coworker has tried to send them through php mail loop but obviously it gets stuck quickly. Is there a conventional (i.e. through PHP script) to accomplish this swiftly? If not, how do you suggest I do this (maybe through exec) without too much overhead?

谢谢!

推荐答案

我使用PEAR的 Mail_Queue 在一个时间排队200,000+邮件。填充数据库是方便,快捷,即使定制内容,然后一个相当简单的脚本发送约250时间 - 如果平均负载不太高。然后,它绕一圈,并将下一批次。

I've used PEAR's Mail_Queue to queue up 200,000+ mails at a time. Populating a database is easy and quick, even with customised content, and then a fairly simple script sends around 250 a time - if the load average isn't too high. Then it loops around and sends the next batch.

您不会向他们的速度比通常是可能的,但它会做到这一点没有任何问题。

You won't send them any faster than is usually possible, but it will do it without any problems.

借助教程为您提供了几乎所有你所需要的一切 - 就在日send_messages.php'脚本环路(在命令行中更好),直到数据库队列为空

The tutorial gives you almost everything you need - just loop around th 'send_messages.php' script (from the command line is better) until the database queue is empty.

这篇关于PHP:发送批量的电子邮件数量巨大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆