简单邮件传输协议(SMTP)是ASCII协议。它基于客户端-服务器模型。它为此服务使用TCP端口号25。因此发送电子邮件;通过对建立TCP的源计算机进行哈希处理来将源IP地址从源传递到目标计算机。若要发送邮件,系统必须包含客户端MTA,并且要接收邮件,系统必须具有服务器MTA。 SMTP将该消息从客户端MTA传输到服务器MTA。要发送邮件,SMTP使用两次时间:一个在发件人和发件人的邮件服务器之间,另一个在两个邮件服务器之间。
SMTP命令:
这些命令从客户端发送到服务器。每个命令都包含一个关键字,后跟零个或多个参数。这意味着也有一些不包含任何参数的关键字。命令格式如下:
Keywords : argument(s)
下表提供了14种不同的SMTP命令:
S.No. | Keyword | Command form | Description | Usage |
---|---|---|---|---|
1. | HELO | HELO |
It provides the identification of the sender i.e. the host name. | Mandatory |
2. | MAIL |
It specifies the originator of the mail. | Mandatory | |
3. | RCPT | RCPT |
It specifies the recipient of mail. | Mandatory |
4. | DATA | DATA |
It specifies the beginning of the mail. | Mandatory |
5. | QUIT | QUIT |
It closes the TCP connection. | Mandatory |
6. | RSET | RSET |
It aborts the current mail transaction but the TCP connection remains open. | Highly recommended |
7. | VRFY | VRFY |
It is use to confirm or verify the user name. | Highly recommended |
8. | NOOP | NOOP |
No operation | Highly recommended |
9. | TURN | TURN |
It reverses the role of sender and receiver. | Seldom used |
10. | EXPN | EXPN |
It specifies the mailing lit to be expanded. | Seldom used |
11. | HELP | HELP |
It send some specific documentation to the system. | Seldom used |
12. | SEND | SEND |
It send mail to the terminal. | Seldom used |
13. | SOML | SOML |
It send mail to the terminal if possible; otherwise to mailbox. | Seldom used |
14. | SAML | SAML |
It send mail to the terminal and mailbox. | Seldom used |