org.apache.commons.net.smtp

Class SMTPCommand


public final class SMTPCommand
extends java.lang.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 HELO are provided where the constant name is the same as the SMTP command.

Author:
Daniel F. Savarese

Field Summary

static int
DATA
static int
EXPAND
static int
EXPN
static int
HELLO
static int
HELO
static int
HELP
static int
LOGIN
static int
LOGOUT
static int
MAIL
static int
MAIL_FROM
static int
NOOP
static int
QUIT
static int
RCPT
static int
RECIPIENT
static int
RESET
static int
RSET
static int
SAML
static int
SEND
static int
SEND_AND_MAIL_FROM
static int
SEND_FROM
static int
SEND_MESSAGE_DATA
static int
SEND_OR_MAIL_FROM
static int
SOML
static int
TURN
static int
VERIFY
static int
VRFY
(package private) static String[]
_commands

Constructor Summary

SMTPCommand()

Method Summary

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

Field Details

DATA

public static final int DATA

Field Value:
3


EXPAND

public static final int EXPAND

Field Value:
9


EXPN

public static final int EXPN

Field Value:
9


HELLO

public static final int HELLO

Field Value:
0


HELO

public static final int HELO

Field Value:
0


HELP

public static final int HELP

Field Value:
10


LOGIN

public static final int LOGIN

Field Value:
0


LOGOUT

public static final int LOGOUT

Field Value:
13


MAIL

public static final int MAIL

Field Value:
1


MAIL_FROM

public static final int MAIL_FROM

Field Value:
1


NOOP

public static final int NOOP

Field Value:
11


QUIT

public static final int QUIT

Field Value:
13


RCPT

public static final int RCPT

Field Value:
2


RECIPIENT

public static final int RECIPIENT

Field Value:
2


RESET

public static final int RESET

Field Value:
7


RSET

public static final int RSET

Field Value:
7


SAML

public static final int SAML

Field Value:
6


SEND

public static final int SEND

Field Value:
4


SEND_AND_MAIL_FROM

public static final int SEND_AND_MAIL_FROM

Field Value:
6


SEND_FROM

public static final int SEND_FROM

Field Value:
4


SEND_MESSAGE_DATA

public static final int SEND_MESSAGE_DATA

Field Value:
3


SEND_OR_MAIL_FROM

public static final int SEND_OR_MAIL_FROM

Field Value:
5


SOML

public static final int SOML

Field Value:
5


TURN

public static final int TURN

Field Value:
12


VERIFY

public static final int VERIFY

Field Value:
8


VRFY

public static final int VRFY

Field Value:
8


_commands

(package private) static final String[] _commands

Constructor Details

SMTPCommand

private SMTPCommand()

Method Details

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.