Package org.apache.commons.net.smtp

# Class SMTPCommand

java.lang.Object
org.apache.commons.net.smtp.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 `HELO` are provided where the constant name is the same as the SMTP command.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `AUTH`
  The authorization command
  `static final int`
  `DATA`
  SMTP command 3.
  `static final int`
  `EHLO`
  The extended hello command
  `static final int`
  `EXPAND`
  Alias for 9.
  `static final int`
  `EXPN`
  SMTP command 9.
  `static final int`
  `HELLO`
  Alias for 0.
  `static final int`
  `HELO`
  SMTP command 0.
  `static final int`
  `HELP`
  SMTP command 10.
  `static final int`
  `LOGIN`
  Alias for 0.
  `static final int`
  `LOGOUT`
  Alias for 13.
  `static final int`
  `MAIL`
  SMTP command 1.
  `static final int`
  `MAIL_FROM`
  Alias for 1.
  `static final int`
  `NOOP`
  SMTP command 11.
  `static final int`
  `QUIT`
  SMTP command 13.
  `static final int`
  `RCPT`
  SMTP command 2.
  `static final int`
  `RECIPIENT`
  Alias for 2.
  `static final int`
  `RESET`
  Alias for 7.
  `static final int`
  `RSET`
  SMTP command 7.
  `static final int`
  `SAML`
  SMTP command 6.
  `static final int`
  `SEND`
  SMTP command 4.
  `static final int`
  `SEND_AND_MAIL_FROM`
  Alias for 6.
  `static final int`
  `SEND_FROM`
  Alias for 4.
  `static final int`
  `SEND_MESSAGE_DATA`
  Alias for 3.
  `static final int`
  `SEND_OR_MAIL_FROM`
  Alias for 5.
  `static final int`
  `SOML`
  SMTP command 5.
  `static final int`
  `TURN`
  SMTP command 12.
  `static final int`
  `VERIFY`
  Alias for 8.
  `static final int`
  `VRFY`
  SMTP command 8.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getCommand(int command)`
  Gets the SMTP protocol command string corresponding to a specified command code.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### HELO

    public static final int HELO
    SMTP command 0.
    See Also:
      - Constant Field Values

  - ### MAIL

    public static final int MAIL
    SMTP command 1.
    See Also:
      - Constant Field Values

  - ### RCPT

    public static final int RCPT
    SMTP command 2.
    See Also:
      - Constant Field Values

  - ### DATA

    public static final int DATA
    SMTP command 3.
    See Also:
      - Constant Field Values

  - ### SEND

    public static final int SEND
    SMTP command 4.
    See Also:
      - Constant Field Values

  - ### SOML

    public static final int SOML
    SMTP command 5.
    See Also:
      - Constant Field Values

  - ### SAML

    public static final int SAML
    SMTP command 6.
    See Also:
      - Constant Field Values

  - ### RSET

    public static final int RSET
    SMTP command 7.
    See Also:
      - Constant Field Values

  - ### VRFY

    public static final int VRFY
    SMTP command 8.
    See Also:
      - Constant Field Values

  - ### EXPN

    public static final int EXPN
    SMTP command 9.
    See Also:
      - Constant Field Values

  - ### HELP

    public static final int HELP
    SMTP command 10.
    See Also:
      - Constant Field Values

  - ### NOOP

    public static final int NOOP
    SMTP command 11.
    See Also:
      - Constant Field Values

  - ### TURN

    public static final int TURN
    SMTP command 12.
    See Also:
      - Constant Field Values

  - ### QUIT

    public static final int QUIT
    SMTP command 13.
    See Also:
      - Constant Field Values

  - ### AUTH

    public static final int AUTH
    The authorization command
    Since:
      3.0
    See Also:
      - Constant Field Values

  - ### EHLO

    public static final int EHLO
    The extended hello command
    Since:
      3.0
    See Also:
      - Constant Field Values

  - ### HELLO

    public static final int HELLO
    Alias for 0.
    See Also:
      - Constant Field Values

  - ### LOGIN

    public static final int LOGIN
    Alias for 0.
    See Also:
      - Constant Field Values

  - ### MAIL_FROM

    public static final int MAIL_FROM
    Alias for 1.
    See Also:
      - Constant Field Values

  - ### RECIPIENT

    public static final int RECIPIENT
    Alias for 2.
    See Also:
      - Constant Field Values

  - ### SEND_MESSAGE_DATA

    public static final int SEND_MESSAGE_DATA
    Alias for 3.
    See Also:
      - Constant Field Values

  - ### SEND_FROM

    public static final int SEND_FROM
    Alias for 4.
    See Also:
      - Constant Field Values

  - ### SEND_OR_MAIL_FROM

    public static final int SEND_OR_MAIL_FROM
    Alias for 5.
    See Also:
      - Constant Field Values

  - ### SEND_AND_MAIL_FROM

    public static final int SEND_AND_MAIL_FROM
    Alias for 6.
    See Also:
      - Constant Field Values

  - ### RESET

    public static final int RESET
    Alias for 7.
    See Also:
      - Constant Field Values

  - ### VERIFY

    public static final int VERIFY
    Alias for 8.
    See Also:
      - Constant Field Values

  - ### EXPAND

    public static final int EXPAND
    Alias for 9.
    See Also:
      - Constant Field Values

  - ### LOGOUT

    public static final int LOGOUT
    Alias for 13.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getCommand

    public static String getCommand(int command)
    Gets the SMTP protocol command string corresponding to a specified command code.
    Parameters:
      `command` - The command code.
    Returns:
      The SMTP protocol command string corresponding to a specified command code.