How to test if PHP mail() has successfully delivered mail

后端 未结 8 1742
陌清茗
陌清茗 2020-12-18 20:01

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

8条回答
  •  既然无缘
    2020-12-18 20:28

    Try this:

    if(@mail($emailRecipient, $subject, $message, $headers))
    {
      echo "Mail Sent Successfully";
    }else{
      echo "Mail Not Sent";
    }
    

提交回复
热议问题