Home arrow Java arrow Page 2 - Java Mail API: Getting Started
JAVA

Java Mail API: Getting Started


In this article, the first in a multi-part series, you will learn the basics of Java Mail and how to use it for data exchange. This article covers the concepts surrounding different mailing protocols, the APIs that form the basis of Java Mail, and the creation of a class containing common email-related functionalities.

Author Info:
By: A.P.Rajshekhar
Rating: 4 stars4 stars4 stars4 stars4 stars / 43
November 16, 2005
TABLE OF CONTENTS:
  1. · Java Mail API: Getting Started
  2. · Mail Protocols: Rules that Govern Email
  3. · Java Mail: Understanding the API
  4. · Java Mail: Putting it all together

print this article
SEARCH DEVARTICLES

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:

  1. SMTP
  2. POP
  3. IMAP
  4. 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.


blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials