e-mail system
An e-mail system should have three main components: a user agent, a mail server, a mail-sending protocol (such as SMTP), and a message-reading protocol (such as pop).
The user agent is the interface between the user and the e-mail system, and in most cases it is a program that runs in the user's PC. Generally with writing, display, processing, communication and other functions.
There are many mail servers available on the Internet for users to choose from, and the mail server works uninterrupted for 24 hours and has a large capacity of mail boxes. The function of a mail server is to send and receive messages, and also to report to the sender about the delivery of the message (delivered, rejected, lost, etc.). The mail server works on a client server basis. A mail server needs to use two different protocols for sending and reading.
It should be noted that a mail server can be both a customer and a server.
For example, when mail server A sends a message to another mail server B, mail Server A acts as an SMTP client and B is the SMTP server.
When mail server A receives mail from another mail server B, mail Server A acts as an SMTP server, and B is the SMTP client.
Several important steps to sending and receiving e-mail:
(1) The sender calls the user agent in the PC to compose and edit the message to be sent.
(2) The sender's user agent sends the message to the sender's mail server using the SMTP protocol.
(3) The SMTP server temporarily stores messages in the message cache queue, waiting to be sent.
(4) The SMTP client of the sending mail server establishes a TCP connection with the SMTP server of the receiving mail server, and then sends the messages in the message cache queue sequentially
(5) After the SMTP server process that is running on the recipient's mail server receives the message, it puts the message in the recipient's user mailbox and waits for the recipient to read it.
(6) When the recipient intends to receive the message, it will run the user agent in the PC and use the POP3 (or IMAP) protocol to read the messages sent to him. Please note that communication between the POP3 server and the POP3 customer is initiated by the POP3 customer.
Simple Mail Transfer Protocol SMTP
SMTP(simple Mail Transfer Protocol) Specifies how information should be exchanged between the two SMTP processes that communicate with each other.
Because SMTP uses client-server mode, the SMTP process that is responsible for sending mail is the SMTP client, and the SMTP process that is responsible for receiving mail is the SMTP server.
Three phases of SMTP communication:
(1) connection established: The connection is established between the SMTP client of the sending host and the SMTP server of the receiving host. SMTP does not use an intermediary mail server.
(2) Mail delivery
(3) Connection release: After the message is sent, SMTP should release the TCP connection.
Message read protocol POP and IMAP
The POP(Post Office Protocol) Post Office Protocol is a very simple, but functionally limited, message-reading protocol. It is now using the third version of POP3.
POP also uses how the client server works. The POP client must be running in the user's PC that receives the message, and the POP server program is running on the mail server of the ISP to which the user is connected.
The POP protocol supports offline mail processing, and when a message is sent to the server, the email client invokes the mail client program to download all unread e-mails (this offline access mode is a store-and-forward service). When a message is sent from the mail server to a personal computer, the mail server deletes the message (but many POP3 servers now support "Download mail, the server does not delete the message", which means that the POP protocol is improved in POP3).
Another protocol that reads messages is IMAP(internetmessage Access Protocol), which is much more complex than the POP protocol.
IMAP also works as a client server, and now newer is version 4, or IMAP4.
Users can manipulate the mail server's mailbox on their own PC, just as if they were locally manipulated. The biggest advantage of IMAP is that users can use different computers in different places to read and process their mails at any time.
Note that you do not confuse the message read protocol POP or IMAP with the Mail Transfer Protocol SMTP.
The sender's user agent sends mail to the source mail server, and the source mail server sends mail to the destination mail server, all using the SMTP protocol.
The POP protocol or IMAP protocol is the protocol used by the user to read the message from the destination mail server.
World Wide Web-based e-mail
Most of the time we're using World Wide Web-based e-mail, and user-agent clients like Outlook are already getting out of the market.
No matter where you are, you can use your browser to send and receive e-mails as long as you are online. At this point, the user agent in the mail system is the common Web browser.
Note that the browser reads the message from the mail server, or sends mail to the mail server using the HTTP protocol instead of IMAP (POP) or SMTP.
For example, a NetEase mailbox user to the Sina mailbox user through the browser to send mail, each stage uses the agreement as follows:
Multi-purpose Internet Mail Extensions MIME
SMTP has the following disadvantages:
SMTP cannot transfer executable files or other binary objects.
SMTP is limited to transmitting 7-bit ASCII code. Many other non-English-speaking languages (such as Chinese, Russian, or even accented French or German) cannot be transmitted.
The SMTP server rejects messages that are longer than a certain length.
The MIME(Multipurpose internetmail Extensions) is then presented in this case. MIME does not alter SMTP or replace it. The MIME intent is to continue to use the current format, but adds the structure of the message body and defines the encoding rules for transmitting non-ASCII code .
The MIME and SMTP relationships are as follows:
A MIME type is a type of file that sets an extension that is opened by an application, and the browser automatically opens with the specified application when the extension file is accessed. Many are used to specify some client-customized file names, as well as some ways to open media files.
The common MIME types are as follows:
MIME type |
Extended Name |
File type |
Application/msexcel |
*.xls *.xla |
Microsoft Excel Dateien |
Application/mshelp |
*.hlp *.chm |
Microsoft Windows Hilfe Dateien |
Application/mspowerpoint |
*.ppt *.ppz *.pps *.pot |
Microsoft Powerpoint Dateien |
Application/msword |
*.doc *.dot |
Microsoft Word Dateien |
Application/octet-stream |
*.exe |
Exe |
Application/pdf |
*.pdf |
Adobe Pdf-dateien |
application/post****** |
*.ai *.eps *.ps |
Adobe Post******-dateien |
Application/rtf |
*.rtf |
Microsoft Rtf-dateien |
application/x-httpd-php |
*.php *.phtml |
Php-dateien |
application/x-java****** |
*.js |
Serverseitige Java******-dateien |
Application/x-shockwave-flash |
*.swf *.cab |
Flash Shockwave-dateien |
Application/zip |
*.zip |
Zip-archivdateien |
Audio/basic |
*.au *.snd |
Sound-dateien |
Audio/mpeg |
*.mp3 |
Mpeg-dateien |
Audio/x-midi |
*.mid *.midi |
Midi-dateien |
Audio/x-mpeg |
*.mp2 |
Mpeg-dateien |
Audio/x-wav |
*.wav |
Wav-dateien |
Image/gif |
*.gif |
Gif-dateien |
Image/jpeg |
*.jpeg *.jpg *.jpe |
Jpeg-dateien |
Image/x-windowdump |
*.xwd |
X-windows Dump |
Text/css |
*.css |
CSS Stylesheet-dateien |
Text/html |
*.htm *.html *.shtml |
-dateien |
text/java****** |
*.js |
Java******-dateien |
Text/plain |
*.txt |
Reine Textdateien |
Video/mpeg |
*.mpeg *.mpg *.mpe |
Mpeg-dateien |
Video/vnd.rn-realvideo |
*.rmvb |
Realplay-dateien |
Video/quicktime |
*.QT *.mov |
Quicktime-dateien |
Video/vnd.vivo |
*viv *.vivo |
Vivo-dateien |
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.