Java mail

JavaMail Projects

JavaMail Project 1

JAVA MAIL API
Previous Home Next

The JAVA MAIL API it is not a part of basic java or core java The JavaMail API is available as an optional package which is mainly use with the Java SE platform and is also included in the Java EE platform. .

The JavaMail API provides a protocol-independent and platform-independent framework to build mail and messaging applications.

The java mal Package can be mainly Accessed in two ways:

  1. It is placing J2ee.jar in the Class path.
  2. It is placing both mail. jar and activation. jar in the Class path.

Java mail api mainly using both .jar file .It is the optional package which is using for sending,reading,composing by electronic base message. we should using this package to create Mail User Agent(MUA) type program, which is simillar to Microsoft Outlook.

The java Mail Api provided to the user protocol independent access for sending and receiving the message divide Api into two types:

  1. The first type of program Api is focus of this course: how can send or receive the message for independent of the provider or protocol.
  2. The second type speaks the protocol : Like as Some specific languages, NNTP,SMTP,POP,IMAP.The JAVA MAIL API in order to communicate into the server. then need the provider or protocols.

Reviewing Related Protocols:

Introduction:

when you using JAVA MAIL API, before using these protocols used with the API. Mainly there are 4 types of protocols using in java mail api.

  1. SMTP
  2. POP
  3. IMAP
  4. MIME

 

SMTP (SIMPLE MAIL TRANSFER PROTOCOL):

Simple Mail Transfer Protocol is an Ineternet protocol whch is mainly use to transfer E-mail (Electronic mail) from MTA (Mail transfer Agent) to MTA.

MTA is a program Which is mainly use to propvide Routes and delevary mail

The objective of SMTP is to provide reliable and efficient mail.

JavaMail-based program will communicate with your ISP's (Internet Service Provider's) SMTP server. That SMTP server will relay the message on to the SMTP server of the recipient(s) to eventually be acquired by the user(s) through POP or IMAP.

There is nothing in the JavaMail API for tasks like configuring a server to relay messages or to add and remove email accounts.

POP (POST OFFICE PROTOCOL):

POP is the mechanism to using most of the people on the internet use to get their mail. At that time POP3 version POP3, RFC1939 defines this protocol. It is a supporter to support the single mailbox for each user. Actually more confusion occur to source, Much of what people are familiar when using POP. There are more mail message they have are not supported by POP at all. this capability are in-built into the program like as Microsoft Outlook. So, when using the JavaMail API, if you want this type of information, you have to calculate it yourself.

IMAP (INTERNET MAIL ACCESS PROTOCOL ):

It is the more advanced program for receiving message. and define to RFC 2060, now this time using version 4, also know as IMAP4. when using this protocol at that time your mail server is supported this protocol. when you using IMAP ,that time you can't change your program instead of POP and expect everything in IMAP to be supported. IMAP supported your mail server, java mail-based can take the advantage of users using multiple folders for multiple users.

MIME (MULTIPURPOSE INTERNET MAIL EXTENSION):

MIME is not a mail transfer protocol. Actually it is defined which type of mail is transferred , this extension check the format of the messages, attachment and so on. many different documents are take effect here: RFC 822, RFC 2045, RFC 2046, and RFC 2047. If the user is using java Mail Api ,you don't need to worry about these format. these formats use in the program or access in your program.

NNTP (NETWORK NEWS TRANSPORT PROTOCOL) AND OTHERS:

The split of in java mail Api between provider and everything else, if you want to se another additional protocol , you are simply or easily using to add support for additional protocols. Sun maintains a list of third party providers , the main advantages and sun does not support to the out -of -the box. then time you find the NNTP and S/MIME (Secure/MIME) and more.

The split of in java mail Api between provider and everything else, if you want to se another additional protocol , you are simply or easily using to add support for additional protocols. Sun maintains a list of third party providers , the main advantages and sun does not support to the out -of -the box. then time you find the NNTP and S/MIME (Secure/MIME) and more.

Previous Home Next