如果电子邮件已发送,则从邮件服务器获取响应
我们最近遇到了一个问题,邮件服务器无法发送重要的定时电子邮件,但 Zend_Mail
send() 函数没有返回 false,因为电子邮件已成功传递到邮件服务器。
在我们的情况下,由于几个 cron 作业产生了数千封不可发送的电子邮件,邮件提示被堵塞。
我们如何与服务器通信并获得某种响应来告诉我们电子邮件已发送。
这与退回无关,因为我们不在乎电子邮件是否可以送达,我们只关心它是否可以发送。
We recently had the problem that important timed emails could not be sent by the mailserver but the Zend_Mail
send() function didn't return false since the email was successfully delivered to the mailserver.
In our situation the mail cue was jammed up due to some thousends of non sendable emails produced by a couple of cron jobs.
How can we communicate to the server and get some sort of response which tells us that the email was sent.
This is not about bouncing because we don't care, if the emails can be delivered, we just care that it can be sent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不是系统管理员,但根据您的邮件服务器,我认为您可以拦截这些邮件并将它们发送/通过管道传送回您的 zend 框架应用程序。例如,在 postfix 上,我认为您可以在队列内容过滤器 http 中执行此操作://www.postfix.org/FILTER_README.html
i'm not a sysadmin, but depending on your mailserver i think you could intercept those mails and send/pipe them back to your zend framework application. for example on postfix i think you could do this in an after queue content filter http://www.postfix.org/FILTER_README.html
我认为这取决于您的邮件服务器以及它具有的任何通知功能,PHP 端几乎没有什么可做的。我不是系统管理员,但我认为在正常的 Linux/Unix 设置中,有关此类故障的通知将进入根邮箱或系统日志,不是吗?
I think this is down to your mail server and whatever notification functions it has, there's little to be done on the PHP end. I'm no sysadmin but I think in a normal Linux/Unix setup, notification about such failures will go into the root mailbox or syslog, won't they?