org.apache.commons.net.smtp

Class SMTPCommand

public final class SMTPCommand extends Object

SMTPCommand stores a set of constants for SMTP command 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. For those who think in terms of the actual SMTP commands, a set of constants such as {@link #HELO HELO } are provided where the constant name is the same as the SMTP command.

Author: Daniel F. Savarese

Field Summary
static intDATA
static intEXPAND
static intEXPN
static intHELLO
static intHELO
static intHELP
static intLOGIN
static intLOGOUT
static intMAIL
static intMAIL_FROM
static intNOOP
static intQUIT
static intRCPT
static intRECIPIENT
static intRESET
static intRSET
static intSAML
static intSEND
static intSEND_AND_MAIL_FROM
static intSEND_FROM
static intSEND_MESSAGE_DATA
static intSEND_OR_MAIL_FROM
static intSOML
static intTURN
static intVERIFY
static intVRFY
Method Summary
static StringgetCommand(int command)
Retrieve the SMTP protocol command string corresponding to a specified command code.

Field Detail

DATA

public static final int DATA

EXPAND

public static final int EXPAND

EXPN

public static final int EXPN

HELLO

public static final int HELLO

HELO

public static final int HELO

HELP

public static final int HELP

LOGIN

public static final int LOGIN

LOGOUT

public static final int LOGOUT

MAIL

public static final int MAIL

MAIL_FROM

public static final int MAIL_FROM

NOOP

public static final int NOOP

QUIT

public static final int QUIT

RCPT

public static final int RCPT

RECIPIENT

public static final int RECIPIENT

RESET

public static final int RESET

RSET

public static final int RSET

SAML

public static final int SAML

SEND

public static final int SEND

SEND_AND_MAIL_FROM

public static final int SEND_AND_MAIL_FROM

SEND_FROM

public static final int SEND_FROM

SEND_MESSAGE_DATA

public static final int SEND_MESSAGE_DATA

SEND_OR_MAIL_FROM

public static final int SEND_OR_MAIL_FROM

SOML

public static final int SOML

TURN

public static final int TURN

VERIFY

public static final int VERIFY

VRFY

public static final int VRFY

Method Detail

getCommand

public static final String getCommand(int command)
Retrieve the SMTP protocol command string corresponding to a specified command code.

Parameters: command The command code.

Returns: The SMTP protcol command string corresponding to a specified command code.