Hello all,
I have a couple of simple php mail forms i use on a couple sites for sending basic contact information in email form when submitted. The code is pretty simple, and i use an IF statement to check to be sure the email has been sent, and if it fails, I am notified by email:
#send the email
if(mail($to, $subject, $message, $headers)) {
... send confirmation message...
}
else {
#notify webmaster
mail($toWebmaster, $failedSubject, $failedMessage, $failedHeaders);
}
My question is... in the $failedMessage, is there a way i can include any error information on why the form might be failing? If so, how would i do something like that?
Thanks in advance,
Jason