Getting a response from the mailserver, if the email has been sent
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, 开发者_如何学JAVAwe just care that it can be sent.
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
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?
精彩评论