August 1999
Intermediate to advanced
1488 pages
72h 53m
English
sendmail.errorMessage()
The errorMessage() method of the SendMail object returns the string error message generated after attempting to send an email.
Listing 8.122 tries to send an instance of the SendMail object. If the send() method fails, the errors it encountered are written to the page.
<SERVER> // Try to send an instance of the mail if(!myMail.send()){ // If there was an error, give the user the email address of who they // should contact about the error, as well as the error code and message. write("There was an error sending your message. Please send email to "); write(myMail.Errorsto + " with the following ... |
Read now
Unlock full access