Updated on 2024-12-12 GMT+08:00

Basic SMTP Commands and Specifications

Basic SMTP Commands and Precautions

Table 1 Basic SMTP Commands

Command

Usage

Note

Restriction

HELO

The client sends a HELO command to the server to identify itself and start an SMTP session.

HELO should be followed by the host name or IP address of the client.

No restrictions. Ensure that the host name or IP address is valid.

EHLO

The client sends an EHLO command to the server to identify itself and start an SMTP session.

EHLO should be followed by the host name or IP address of the client. It will trigger the server to send extension capability notifications.

No restrictions. Ensure that the host name or IP address is valid.

AUTH LOGIN

Used for client authentication.

Encode the username and password using Base64.

Use the SMTP account provided by the carrier for login.

AUTH PLAIN

Used for client authentication.

Encode the username and password using Base64. Telnet login is not supported.

Use the SMTP account provided by the carrier for login.

STARTTLS

Enable TLS encryption on established SMTP connections.

Only port 587 supports the STARTTLS command.

-

MAIL FROM

Specifies the sender email address, for example, MAIL FROM:<123@huawei.com>.

The email address must be between <> and in the correct format.

Used only after AUTH LOGIN is executed. Only the email address registered on the KooMessage console can be used.

RCPT TO

Specifies one or more recipient email addresses, for example, RCPT TO:<456@huawei.com>.

The email address must be between <> and in the correct format.

Used only after AUTH LOGIN is executed. If there are multiple recipients, run RCPT TO to enter the recipients separately. A maximum of 100 recipients are supported at the same time.

DATA

Indicates the beginning of the mail body. The mail body ends with a single dot (.).

The email body must comply with the MIME standard of RFC 5322. Ensure that the email body has been correctly encoded and formatted.

Used only after AUTH LOGIN is executed

HELP

Obtains help information.

-

-

RSET

Resets the context.

The information that has been set needs to be reset.

-

NOOP

Keeps the connection.

-

-

QUIT

Disconnects the connection.

-

-

Extensions Supported by SMTP

SMTP supports multiple extensions, which are notified to the client through the response of the EHLO command.

  • AUTH LOGIN PLAIN: The LOGIN and PLAIN authentication modes are supported.
  • STARTTLS: TLS encryption can be enabled on established SMTP connections.
  • SIZE 8388608: The maximum size of the email body is 8 MB, and the maximum size of a single attachment is 4 MB.

Connection Mode Supported by SMTP

A maximum of 10 connections can be generated for each user on each node. If no command is sent within 30 seconds, the connection will be disconnected.