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`
    `static int` | `EHLO` The extended hello command
    `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`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getCommand(int command)` Retrieve 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

    - #### HELO

          public static final int HELO

      See Also:
        Constant Field Values

    - #### MAIL

          public static final int MAIL

      See Also:
        Constant Field Values

    - #### RCPT

          public static final int RCPT

      See Also:
        Constant Field Values

    - #### DATA

          public static final int DATA

      See Also:
        Constant Field Values

    - #### SEND

          public static final int SEND

      See Also:
        Constant Field Values

    - #### SOML

          public static final int SOML

      See Also:
        Constant Field Values

    - #### SAML

          public static final int SAML

      See Also:
        Constant Field Values

    - #### RSET

          public static final int RSET

      See Also:
        Constant Field Values

    - #### VRFY

          public static final int VRFY

      See Also:
        Constant Field Values

    - #### EXPN

          public static final int EXPN

      See Also:
        Constant Field Values

    - #### HELP

          public static final int HELP

      See Also:
        Constant Field Values

    - #### NOOP

          public static final int NOOP

      See Also:
        Constant Field Values

    - #### TURN

          public static final int TURN

      See Also:
        Constant Field Values

    - #### QUIT

          public static final int QUIT

      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

      See Also:
        Constant Field Values

    - #### LOGIN

          public static final int LOGIN

      See Also:
        Constant Field Values

    - #### MAIL_FROM

          public static final int MAIL_FROM

      See Also:
        Constant Field Values

    - #### RECIPIENT

          public static final int RECIPIENT

      See Also:
        Constant Field Values

    - #### SEND_MESSAGE_DATA

          public static final int SEND_MESSAGE_DATA

      See Also:
        Constant Field Values

    - #### SEND_FROM

          public static final int SEND_FROM

      See Also:
        Constant Field Values

    - #### SEND_OR_MAIL_FROM

          public static final int SEND_OR_MAIL_FROM

      See Also:
        Constant Field Values

    - #### SEND_AND_MAIL_FROM

          public static final int SEND_AND_MAIL_FROM

      See Also:
        Constant Field Values

    - #### RESET

          public static final int RESET

      See Also:
        Constant Field Values

    - #### VERIFY

          public static final int VERIFY

      See Also:
        Constant Field Values

    - #### EXPAND

          public static final int EXPAND

      See Also:
        Constant Field Values

    - #### LOGOUT

          public static final int LOGOUT

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getCommand

          public static 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.

Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.