如何测试PHP mail()是否已成功发送邮件 [英] How to test if PHP mail() has successfully delivered mail

查看:438
本文介绍了如何测试PHP mail()是否已成功发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何测试mail()是否已成功发送邮件?

How can I test if mail() has successfully delivered mail?

推荐答案

mail()只是根据是否已成功接受邮件传递而返回布尔值.从 php.net 网站:

Well mail() simply returns a boolean value depending on whether the mail was successfully accepted for delivery. From the php.net site:

如果已成功接受邮件发送,则返回TRUE,即返回FALSE 否则.

Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.

重要的是要注意,因为该邮件已被接受 传递,并不意味着邮件实际上会到达预期的位置 目的地.

It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.

因此,您可以测试一下是否已发送",但是检查它是否已交付是另一回事.

So you can test to see if it's been "sent", however checking if it's been delivered is another story.

这篇关于如何测试PHP mail()是否已成功发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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