Sunday, May 19, 2019

php - How can I get the error message for the mail() function?

I've been using the PHP mail() function.



If the mail doesn't send for any reason, I'd like to echo the error message. How would I do that?




Something like



$this_mail = mail('example@example.com', 'My Subject', $message);

if($this_mail) echo 'sent!';
else echo error_message;


Thanks!

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...