Email is one of the primary services running on the internet. Here in this article, we will discuss the email that how email is working end devices. What application, protocol and services are required for email? Email messages are stored in a database on the email server. The email is using store-and-forward method for sending and storing the messages. The email clients communicate with the servers running mail services to send and receive email. The client connected server communicates with other mail servers to transport messages from one domain to another. The client does not communicate directly with another email client when sending an email. But, both mail clients rely on the mail server to transport messages.
There is three types of protocol which are used for email process: SMTP (Simple Mail Transfer Protocol), POP(Post Office Protocol), and IMAP(internet messaging Access Protocol). The application layer process that sends mail uses SMTP. But a client retrieves email using POP or IMAP.
Simple Mail Transfer Protocol (SMTP) Operation
The SMTP message formats required a message body with message header. The body of the message can hold any amount of text, the message header must have a properly formatted recipient email address and a sender address.
When a client sends an email message, the client SMTP process connects with a server SMTP process on port 25. When the connection is established, then the client tries to send the email message to the server. After the server receives the email message, it either places the message in a local account in case of the local recipient or forwards the message to another mail server for delivery. If the destination email server is busy or not online then the SMTP spools message to be sent at the later time. The server checks for the queue periodically and attempts to send them again. If the message expiration time is over and the message is still in the queue, it is returned to the sender as an undeliverable message.
The figure below illustrates the technique of message sending. The client sends an email message to email@example.com. The SMTP / POP server-1 will receive the message. Server-1 will check the recipient’s list of local recipients. If found the message will be placed on the local account, if not found, the message will be forwarded to SMTP / POP server-2.
Post Office Protocol (POP) Operation
The POP server passively listening on TCP port 110 for client connection requests. When a client needs to make use of the POP service; it sends a request to start a TCP connection with the server. On establishing a connection the POP server sends a welcome to the client. After connection establish both client and POP server exchange commands and responses until the connection is closed or aborted.
With POP, incoming email messages are downloaded to the client and then removed from the server. The POP server works as a temporary holding area for mail until it is downloaded by the mail client. So there is no central place where email messages are kept. Because of no centralized storage for email messages; it is no an attractive choice for a small business that needs a centralized storage for backup.
Internet Messaging Access Protocol (IMAP) Operation
The Internet Message Access Protocol (commonly known as IMAP is another protocol that describes a technique to retrieve email messages from the remote mail server. An IMAP server usually listens on port 143 and IMAP over SSL is assigned port number 993. Unlike POP, when the user connects to an IMAP- server, copies of the mail are downloaded to the client application. The original messages are held in reserve on the server until the user explicitly deletes them. Users view copies of the messages in their email client software.
Incoming email messages are stored on the email server that in the recipient’s email box. The user retrieves the messages with an email client that uses one of a number of email retrieval protocols. The majority of clients support the standard protocols, SMTP for sending an e-mail message, POP and IMAP for retrieving email.
The IMAP client can make a file hierarchy on the server to organize and store emails. When a user wants to delete a mail; the server synchronizes that command and deletes the message from the mail server.