php:寻找支持消息排队的电子邮件库 [英] php: looking for email library which supports message queuing

查看:122
本文介绍了php:寻找支持消息排队的电子邮件库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个电子邮件图书馆来建立我们公司内部的通讯系统。
它应该支持消息队列(将邮件送入队列,在后台自动邮寄)而不阻止Web服务器。
所以我认为后台处理应该作为服务器上的后台服务运行,
类似于aspmail,但是对于php。



任何建议?
谢谢

解决方案

我使用了PEAR的 Mail_Queue ,一次排队20万条以上的邮件。即使使用自定义内容,填充数据库也是简单快捷的,然后一个相当简单的脚本每次发送大约250次 - 如果负载平均值不太高。然后它循环并发送下一批。它从后台运行,它很容易设置,以便如果队列表为空,它将暂停一会儿再次检查(因为检查几次不会帮助任何人)。



还检查机器的负载平均值的优点是它只会通过队列紧缩,而不会出现自创资源不足的问题。



Mail_Queue 教程给你几乎所有你需要的 - 只是循环在'send_messages.php'脚本(从命令行更好),直到数据库队列为空,然后暂停一个 - 再循环。


i'm looking for a email library for building up a newsletter system inside our company. it should support message queuing (feeding mails to the queue, automatic mailing in the background) without blocking the webserver. so i think background processing should be run as background service on the server, similar to aspmail but for php.

any suggestions? thanks

解决方案

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. That runs from the background, and Its easy to set so that if the queue table is empty, it pausing for a moment before it checks again (because checking several times a second won't help anyone).

The advantage of also checking the load average of the machine is that it will just crunch through the queue without any problems of self-created resource starvation.

The Mail_Queue 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, then pause a while - and loop again.

这篇关于php:寻找支持消息排队的电子邮件库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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