简体   繁体   English

如何知道发送邮件的传递状态

[英]How to know send mail delivery status

Using PHPmailer how may I be able to know whether a sent mail delivered to the user or not. 使用PHPmailer,我如何能够知道已发送的邮件是否传递给用户。 Actually I want to know the delivery status of the sent mail using PHP. 实际上,我想知道使用PHP发送的邮件的传递状态。 Is it possible? 可能吗? Please let me know. 请告诉我。

You could try something like this: 您可以尝试这样的事情:

if($mail->send()) {
  // Do something if email sent successfully
}

As I understand it, it would depend on your email service. 据我了解,这取决于您的电子邮件服务。 If you are using something like MailGun's API, you could get a delivery status on that, but if you are just using a standard SMTP server, checking if the email sent successfully is about as far as you an go. 如果您使用的是MailGun的API之类的内容,则可能会获得传递状态,但是如果您使用的是标准SMTP服务器,请检查是否成功发送了电子邮件。

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

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