简体   繁体   English

使用php邮件功能捕获自动邮件返回

[英]Catch automatic mail return with php mail function

I'm using the function "mail" to send an email to an user in php. 我正在使用“mail”功能向php中的用户发送电子邮件。 The information in this email needs to be only known in the email (not stocked on the server). 此电子邮件中的信息只需在电子邮件中已知(未在服务器上存储)。

But some of the users have, for some reasons, an invalid email. 但是,由于某些原因,一些用户的电子邮件无效。 When you try to send an email to an unknown address, you receive an automatic email from "Mail delivery system". 当您尝试将电子邮件发送到未知地址时,您会收到来自“邮件传递系统”的自动电子邮件。

The idea is that I want to catch this email to be able to manage this situation. 我的想法是,我想抓住这封电子邮件,以便能够管理这种情况。 Is there any way to do this in php ? 有没有办法在PHP中这样做? Or is it possible to test if an email is reachable ? 或者是否可以测试电子邮件是否可以访问?

Thanks in advance. 提前致谢。

I have been using this library in a few projects and it does the job of handling bounces fairly well. 我一直在一些项目中使用这个库 ,它可以很好地处理弹跳。 No handler like these can be made to interpret bounce email 100% correct since some MTA:s do not follow the RFC standards, and there are other libraries available out there as well. 没有像这样的处理程序可以解释退回邮件100%正确,因为一些MTA:s不遵循RFC标准,并且还有其他库可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM