SMTP structure and principles

Source: Internet
Author: User
Tags mail

Basic structure of SMTP

The SMTP (Simple Mail Transfer Protocol) protocol is designed to ensure reliable and efficient delivery of e-mail. The TCP/IP protocol has an SMTP protocol in the application layer, but in fact it has nothing to do with the transport system and mechanism, requiring only a reliable data flow path. It can work on TCP, and it can work on protocols such as NCP, NITs, and so on. On TCP, it uses port 25 for transmission. An important feature of SMTP is that you can send mail in an interactive communication system.

1. Model of SMTP

SMTP provides a mechanism for message transmission that through balls messages to each other when both the recipient and the sender are on a network, and is forwarded through one or more intermediary servers when both are not on the same network. SMTP is first requested by the sender to establish a two-way communication channel with the recipient SMTP, which can be either the final recipient or the intermediate forwarding server. When the recipient's server confirms that a connection can be made, it can begin communication. The following is a schematic diagram of the SMTP model.

  

The sender SMTP notifies the recipient of the identity of the sender by sending a mail command, and if the recipient accepts it, it will answer OK. The sender then issues the RCPT command to inform the recipient of the identity of the receiver, SMTP confirm whether to receive or forward, if agreed to answer OK; then you can transfer the data. In the communication process, the sender of SMTP and the recipient of SMTP using a dialogue-style interaction, the sender of the request, the recipient to confirm, confirmed before the next move. The whole process is controlled by the sender, and sometimes it needs to be validated several times.

  

To ensure that the reply command is valid, SMTP requires the sender to provide the recipient's server and mailbox. The commands and replies to a message have a strict syntax definition, and the reply has a corresponding numeric code. All commands are made up of ASCII code. The command code is case insensitive, as mail and Mail﹑mail are equivalent.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.