MAIL FROM

The MAIL FROM: command is used (once), after a HELO or EHLO command, to identify the sender of a piece of mail.
Read syntax diagramSkip visual syntax diagramMAIL FROM: < sender_path_address> SIZE= number_of_bytesBODY=7BITBODY=8BITMIME
Operand
Description
sender_path_address
Specifies the full path address of the sender of the mail. Definitions for valid sender_path_address specifications can be obtained from the RFCs that define the naming conventions used throughout the Internet. For detailed information, consult the RFCs listed in the section SMTP Commands.
SIZE=number_of_bytes
Specifies the size of the mail, in bytes, including carriage return/line feed (CRLF, X'0D0A') pairs. The SIZE parameter has a range from 0 to 2,147,483,647.
BODY=7BIT
Specifies that the message is encoded using seven significant bits per 8-bit octet (byte). In practice, however, the body is typically encoded using all eight bits.
BODY=8BITMIME
Specifies that the message is encoded using all eight bits of each octet (byte) and may contain MIME headers.
Note: The SIZE, BODY=7BIT, and BODY=8BITMIME options of the MAIL FROM: command should be used only if an EHLO command was used to initiate a mail transaction. If an EHLO command was not used for this purpose, SMTP ignores these parameters if they are present.

If the SMTP server is known to support the SMTP service extension for Message Size Declaration, the client sending the mail can specify the optional SIZE= parameter with its MAIL FROM: commands. The client then can use the responses to these commands to determine whether the receiving SMTP server has sufficient resources available to process its mail before any data is transmitted to that server.

When a MAIL FROM: command is received that includes the optional SIZE= parameter, the SMTP server compares the supplied number_of_bytes value to its allowed maximum message size (defined by the MAXMAILBYTES statement in the SMTP CONFIG file) to determine if the mail should be accepted. If number_of_bytes exceeds the MAXMAILBYTES value, a reply code 552 is returned to the client.

The SIZE= parameter is evaluated only for MAIL FROM: commands received over a TCP connection; this parameter and its value are ignored when they are received over a batch connection.