// Try to send and instance of the mail if(!myMail.send()){ // If there was an error, give the user the e-mail 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 e-mail to "); write(myMail.Errorsto + " with the following error message"); write("Error " + myMail.errorCode() + ": " + myMail.errorMessage()); }else{ // If there was not an error, tell the user they were successful. write("Your message was sent successfully!"); }