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

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### AUTH

          public static final int AUTH

      The authorization command
      See Also:
        Constant Field Values

    - #### DATA

          public static final int DATA

      SMTP command 3.
      See Also:
        Constant Field Values

    - #### EHLO

          public static final int EHLO

      The extended hello command
      See Also:
        Constant Field Values

    - #### EXPAND

          public static final int EXPAND

      Alias for 9.
      See Also:
        Constant Field Values

    - #### EXPN

          public static final int EXPN

      SMTP command 9.
      See Also:
        Constant Field Values

    - #### HELLO

          public static final int HELLO

      Alias for 0.
      See Also:
        Constant Field Values

    - #### HELO

          public static final int HELO

      SMTP command 0.
      See Also:
        Constant Field Values

    - #### HELP

          public static final int HELP

      SMTP command 10.
      See Also:
        Constant Field Values

    - #### LOGIN

          public static final int LOGIN

      Alias for 0.
      See Also:
        Constant Field Values

    - #### LOGOUT

          public static final int LOGOUT

      Alias for 13.
      See Also:
        Constant Field Values

    - #### MAIL

          public static final int MAIL

      SMTP command 1.
      See Also:
        Constant Field Values

    - #### MAIL_FROM

          public static final int MAIL_FROM

      Alias for 1.
      See Also:
        Constant Field Values

    - #### NOOP

          public static final int NOOP

      SMTP command 11.
      See Also:
        Constant Field Values

    - #### QUIT

          public static final int QUIT

      SMTP command 13.
      See Also:
        Constant Field Values

    - #### RCPT

          public static final int RCPT

      SMTP command 2.
      See Also:
        Constant Field Values

    - #### RECIPIENT

          public static final int RECIPIENT

      Alias for 2.
      See Also:
        Constant Field Values

    - #### RESET

          public static final int RESET

      Alias for 7.
      See Also:
        Constant Field Values

    - #### RSET

          public static final int RSET

      SMTP command 7.
      See Also:
        Constant Field Values

    - #### SAML

          public static final int SAML

      SMTP command 6.
      See Also:
        Constant Field Values

    - #### SEND

          public static final int SEND

      SMTP command 4.
      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

    - #### SEND_FROM

          public static final int SEND_FROM

      Alias for 4.
      See Also:
        Constant Field Values

    - #### SEND_MESSAGE_DATA

          public static final int SEND_MESSAGE_DATA

      Alias for 3.
      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

    - #### SOML

          public static final int SOML

      SMTP command 5.
      See Also:
        Constant Field Values

    - #### TURN

          public static final int TURN

      SMTP command 12.
      See Also:
        Constant Field Values

    - #### VERIFY

          public static final int VERIFY

      Alias for 8.
      See Also:
        Constant Field Values

    - #### VRFY

          public static final int VRFY

      SMTP command 8.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### 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.