How can I catch an error caused by mail()?

后端 未结 5 751
陌清茗
陌清茗 2020-12-01 18:06

Does anyone know how can I catch a mail error (error is displayed while sending email and the error is caused by the mailserver down) in php?

Error that was caused b

5条回答
  •  囚心锁ツ
    2020-12-01 18:26

    also using http://php.net/error_get_last will not help you out, because mail() does not emmit its errors into this function.

    Only way seems to be using a proper mailer, like already suggested above.

提交回复
热议问题