Java Mail API: Getting Started - Mail Protocols: Rules that Govern Email
(Page 2 of 4 )
Protocols are rules that define an exact format for communication between systems. In the case of mailing systems, there are four main protocols:
- SMTP
- POP
- IMAP
- MIME
Let's take a look at each of them.
1. SMTP:
SMTP, short for Simple Mail Transfer Protocol, defines a mechanism for delivery of email. Any email client, to transfer mail, contacts the SMTP server of the organization that, in turn, delivers the message to the recipient’s SMTP server. The recipient extracts the message using POP or IMAP. In essence, SMTP’s function is only to deliver the message.
2. POP:
It is acronym for Post Office Protocol. It is currently in its third version, known as POP3. Most of the mail servers use this protocol to provide the delivered messages to the user. In reality POP3 just ensures that each user has his or her own mailbox.
3. IMAP:
IMAP stands for Internet Message Access Protocol. While POP is for offline access of messages, IMAP is for online access. In other words, when POP is used for accessing the messages, they are offloaded from the server, whereas in the case of IMAP, they are accessed on the server itself. In essence, IMAP allows a client application to access a remote message repository as if it were local. When compared to POP, IMAP taxes the server heavily.
4. MIME:
Multipart Internet Mail Extension, or MIME for short, is not about delivery or storage of messages. It is about the attachment and type of content being delivered.
When working with Java Mail API, one doesn’t have to worry about which of these have to be supported, because they can be plugged in any time in the future. Now that the protocols have been introduced, let's move on to the next section.
Next: Java Mail: Understanding the API >>
More Java Articles
More By A.P.Rajshekhar