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
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.