Return TypeFunction nameArguments
const char*ReportErrorStatus(SMTPCode,)

Declared and defined in file: hzMailer.cpp

Function Logic:

0:START 1:eSmtpCode 2:SMTP_NOOP 3:Return *smtp_code_text[0] 4:SMTP_CONN_FAIL 5:Return *smtp_code_text[1] 6:SMTP_CONN_REFUSED 7:Return *smtp_code_text[2] 8:SMTP_STATUS_NS 9:Return *smtp_code_text[3] 10:SMTP_STATUS 11:Return *smtp_code_text[4] 12:SMTP_HELP 13:Return *smtp_code_text[5] 14:SMTP_READY 15:Return *smtp_code_text[6] 16:SMTP_QUIT 17:Return *smtp_code_text[7] 18:SMTP_GO_AHEAD 19:Return *smtp_code_text[8] 20:SMTP_OK 21:Return *smtp_code_text[9] 22:SMTP_NOTLOCAL 23:Return *smtp_code_text[10] 24:SMTP_NOVRFY 25:Return *smtp_code_text[11] 26:SMTP_LOGINFO 27:Return *smtp_code_text[12] 28:SMTP_SENDDATA 29:Return *smtp_code_text[13] 30:SMTP_TIMEOUT 31:Return *smtp_code_text[14] 32:SMTP_UNAVAILABLE 33:Return *smtp_code_text[15] 34:SMTP_MBOX_FULL 35:Return *smtp_code_text[16] 36:SMTP_DISK_FULL 37:Return *smtp_code_text[17] 38:SMTP_MBOX_HALT 39:Return *smtp_code_text[18] 40:SMTP_TIMEOUT_PX 41:Return *smtp_code_text[19] 42:SMTP_CONN_XMIT 43:Return *smtp_code_text[20] 44:SMTP_CONN_HOPS 45:Return *smtp_code_text[21] 46:SMTP_TIMEOUT_NS 47:Return *smtp_code_text[22] 48:SMTP_ROUTE 49:Return *smtp_code_text[23] 50:SMTP_MBOXBUSY 51:Return *smtp_code_text[24] 52:SMTP_PROCERROR 53:Return *smtp_code_text[25] 54:SMTP_NOSPACE 55:Return *smtp_code_text[26] 56:SMTP_CLIENT_ERR 57:Return *smtp_code_text[27] 58:SMTP_BADCOMMAND 59:Return *smtp_code_text[28] 60:SMTP_BADSYNTAX 61:Return *smtp_code_text[29] 62:SMTP_NOCOMMAND 63:Return *smtp_code_text[30] 64:SMTP_BAD_CMD_SEQ 65:Return *smtp_code_text[31] 66:SMTP_BAD_PARAM 67:Return *smtp_code_text[32] 68:SMTP_BAD_SNDR_ADDR 69:Return *smtp_code_text[33] 70:SMTP_BAD_RCPT_ADDR 71:Return *smtp_code_text[34] 72:SMTP_BAD_HOST 73:Return *smtp_code_text[35] 74:SMTP_BAD_ADDR_TYPE 75:Return *smtp_code_text[36] 76:SMTP_MSG_SIZE 77:Return *smtp_code_text[37] 78:SMTP_BAD_SERVER 79:Return *smtp_code_text[38] 80:SMTP_BAD_SENDER 81:Return *smtp_code_text[39] 82:SMTP_NACK 83:Return *smtp_code_text[40] 84:SMTP_TRYOTHER 85:Return *smtp_code_text[41] 86:SMTP_MBOXFULL 87:Return *smtp_code_text[42] 88:SMTP_BADNAME 89:Return *smtp_code_text[43] 90:SMTP_FAILED 91:Return *smtp_code_text[44] 92:Return *smtp_code_text[45]

Function body:

const char* ReportErrorStatus (SMTPCode eSmtpCode)
{
   static  hzString    smtp_code_text  [] =
   {
       "0   SMTP return code indechicperable",
       "101 The server is unable to connect",
       "111 Connection refused or inability to open an SMTP stream",
       "200 Non standard system status message or help reply",
       "211 System status, or system help reply",
       "214 Help message (this reply is useful only to the human user)",
       "220 Service ready",
       "221 Service closing transmission channel",
       "235 Tells client to go ahead",
       "250 Requested mail action okay, completed",
       "251 User not local; will forward to",
       "252 Cannot VRFY user, but will accept message and attempt delivery",
       "334 Login info, either username or password",
       "354 Start mail input; end with <CRLF>.<CRLF>",
       "420 General connection timeout issue",
       "421 Service not available",
       "422 The recipient’s mailbox has exceeded its storage limit",
       "431 Not enough space on the disk - Expected to be temporary",
       "432 Recipient’s incoming mail queue has been stopped",
       "441 The recipient’s server is not responding",
       "442 The connection was dropped during the transmission.",
       "446 The maximum hop count was exceeded for the message",
       "447 Some SMTP servers will send this if they have decided to time out the client (for being too slow).",
       "449 Routing error",
       "450 Requested mail action not taken: mailbox unavailable (E.g., mailbox busy)",
       "451 Requested action aborted: local error in processing",
       "452 Action not taken: no space left",
       "471 Some SMTP servers return this in respose to errors on the part of the connecting client (as they see it).",
       "500 Syntax error, command unrecognized (This may include errors such as cmd line too long)",
       "501 Syntax error in parameters or arguments",
       "502 Command not implemented",
       "503 Bad sequence of commands",
       "504 Command parameter not implemented",
       "510 Bad email address",
       "511 Bad email address",
       "512 Host server for the recipient’s domain name cannot be found in DNS",
       "513 Address type is incorrect",
       "523 Size of your mail exceeds the server limits",
       "530 Authentication problem",
       "541 The recipient address rejected your message",
       "550 Non-existent email address",
       "551 User not local or address invalid.",
       "552 Requested mail action aborted: exceeded storage allocation",
       "553 Mailbox name not allowed (E.g., mailbox syntax incorrect)",
       "554 Transaction failed (Or in the case of a connection-opening response, No SMTP service)",
       "999 Not a 3 digit entity"
   } ;
   switch  (eSmtpCode)
   {
   case SMTP_NOOP:             return *smtp_code_text[0];
   case SMTP_CONN_FAIL:        return *smtp_code_text[1];
   case SMTP_CONN_REFUSED:     return *smtp_code_text[2];
   case SMTP_STATUS_NS:        return *smtp_code_text[3];
   case SMTP_STATUS:           return *smtp_code_text[4];
   case SMTP_HELP:             return *smtp_code_text[5];
   case SMTP_READY:            return *smtp_code_text[6];
   case SMTP_QUIT:             return *smtp_code_text[7];
   case SMTP_GO_AHEAD:         return *smtp_code_text[8];
   case SMTP_OK:               return *smtp_code_text[9];
   case SMTP_NOTLOCAL:         return *smtp_code_text[10];
   case SMTP_NOVRFY:           return *smtp_code_text[11];
   case SMTP_LOGINFO:          return *smtp_code_text[12];
   case SMTP_SENDDATA:         return *smtp_code_text[13];
   case SMTP_TIMEOUT:          return *smtp_code_text[14];
   case SMTP_UNAVAILABLE:      return *smtp_code_text[15];
   case SMTP_MBOX_FULL:        return *smtp_code_text[16];
   case SMTP_DISK_FULL:        return *smtp_code_text[17];
   case SMTP_MBOX_HALT:        return *smtp_code_text[18];
   case SMTP_TIMEOUT_PX:       return *smtp_code_text[19];
   case SMTP_CONN_XMIT:        return *smtp_code_text[20];
   case SMTP_CONN_HOPS:        return *smtp_code_text[21];
   case SMTP_TIMEOUT_NS:       return *smtp_code_text[22];
   case SMTP_ROUTE:            return *smtp_code_text[23];
   case SMTP_MBOXBUSY:         return *smtp_code_text[24];
   case SMTP_PROCERROR:        return *smtp_code_text[25];
   case SMTP_NOSPACE:          return *smtp_code_text[26];
   case SMTP_CLIENT_ERR:       return *smtp_code_text[27];
   case SMTP_BADCOMMAND:       return *smtp_code_text[28];
   case SMTP_BADSYNTAX:        return *smtp_code_text[29];
   case SMTP_NOCOMMAND:        return *smtp_code_text[30];
   case SMTP_BAD_CMD_SEQ:      return *smtp_code_text[31];
   case SMTP_BAD_PARAM:        return *smtp_code_text[32];
   case SMTP_BAD_SNDR_ADDR:    return *smtp_code_text[33];
   case SMTP_BAD_RCPT_ADDR:    return *smtp_code_text[34];
   case SMTP_BAD_HOST:         return *smtp_code_text[35];
   case SMTP_BAD_ADDR_TYPE:    return *smtp_code_text[36];
   case SMTP_MSG_SIZE:         return *smtp_code_text[37];
   case SMTP_BAD_SERVER:       return *smtp_code_text[38];
   case SMTP_BAD_SENDER:       return *smtp_code_text[39];
   case SMTP_NACK:             return *smtp_code_text[40];
   case SMTP_TRYOTHER:         return *smtp_code_text[41];
   case SMTP_MBOXFULL:         return *smtp_code_text[42];
   case SMTP_BADNAME:          return *smtp_code_text[43];
   case SMTP_FAILED:           return *smtp_code_text[44];
   }
   return *smtp_code_text[45];
}