Package org.apache.commons.net.smtp
Class SMTPReply
java.lang.Object
org.apache.commons.net.smtp.SMTPReply
SMTPReply stores a set of constants for SMTP reply codes. To interpret the meaning of the codes, familiarity with RFC 821 is assumed. The mnemonic constant
names are transcriptions from the code descriptions of RFC 821.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isNegativePermanent
(int reply) Determine if a reply code is a negative permanent response.static boolean
isNegativeTransient
(int reply) Determine if a reply code is a negative transient response.static boolean
isPositiveCompletion
(int reply) Determine if a reply code is a positive completion response.static boolean
isPositiveIntermediate
(int reply) Determine if a reply code is a positive intermediate response.static boolean
isPositivePreliminary
(int reply) Determine if a reply code is a positive preliminary response.
-
Field Details
-
SYSTEM_STATUS
- See Also:
-
HELP_MESSAGE
- See Also:
-
SERVICE_READY
- See Also:
-
SERVICE_CLOSING_TRANSMISSION_CHANNEL
- See Also:
-
ACTION_OK
- See Also:
-
USER_NOT_LOCAL_WILL_FORWARD
- See Also:
-
START_MAIL_INPUT
- See Also:
-
SERVICE_NOT_AVAILABLE
- See Also:
-
ACTION_NOT_TAKEN
- See Also:
-
ACTION_ABORTED
- See Also:
-
INSUFFICIENT_STORAGE
- See Also:
-
UNRECOGNIZED_COMMAND
- See Also:
-
SYNTAX_ERROR_IN_ARGUMENTS
- See Also:
-
COMMAND_NOT_IMPLEMENTED
- See Also:
-
BAD_COMMAND_SEQUENCE
- See Also:
-
COMMAND_NOT_IMPLEMENTED_FOR_PARAMETER
- See Also:
-
MAILBOX_UNAVAILABLE
- See Also:
-
USER_NOT_LOCAL
- See Also:
-
STORAGE_ALLOCATION_EXCEEDED
- See Also:
-
MAILBOX_NAME_NOT_ALLOWED
- See Also:
-
TRANSACTION_FAILED
- See Also:
-
-
Method Details
-
isNegativePermanent
Determine if a reply code is a negative permanent response. All codes beginning with a 5 are negative permanent responses. The SMTP server will send a negative permanent response on the failure of a command that cannot be reattempted with success.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative permanent response, false if not.
-
isNegativeTransient
Determine if a reply code is a negative transient response. All codes beginning with a 4 are negative transient responses. The SMTP server will send a negative transient response on the failure of a command that can be reattempted with success.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a negative transient response, false if not.
-
isPositiveCompletion
Determine if a reply code is a positive completion response. All codes beginning with a 2 are positive completion responses. The SMTP server will send a positive completion response on the final successful completion of a command.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive completion response, false if not.
-
isPositiveIntermediate
Determine if a reply code is a positive intermediate response. All codes beginning with a 3 are positive intermediate responses. The SMTP server will send a positive intermediate response on the successful completion of one part of a multi-part sequence of commands. For example, after a successful DATA command, a positive intermediate response will be sent to indicate that the server is ready to receive the message data.- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive intermediate response, false if not.
-
isPositivePreliminary
Determine if a reply code is a positive preliminary response. All codes beginning with a 1 are positive preliminary responses. Postitive preliminary responses are used to indicate tentative success. No further commands can be issued to the SMTP server after a positive preliminary response until a follow up response is received from the server.Note: No SMTP commands defined in RFC 822 provide this type of reply.
- Parameters:
reply
- The reply code to test.- Returns:
- True if a reply code is a positive preliminary response, false if not.
-