August 1999
Intermediate to advanced
1488 pages
72h 53m
English
sendmail.errorCode()
The errorCode() method of the SendMail object returns one of six error codes after attempting to send an email. These codes are defined in Table 8.23.
| Code | Description |
|---|---|
| 0 | The email was sent successfully. |
| 1 | The SMTP sending mail server was not specified. |
| 2 | The SMTP sending mail server was down or does not exist. |
| 3 | No recipient email address was specified. |
| 4 | No sender's email address was specified. |
| 5 | Connection problems and data not sent. |
Listing 8.121 tries to send an instance of the SendMail object. If the send() method fails, the errors it encountered are written to the page.
Read now
Unlock full access