There are a unit some protocols that area unit employed in JavaMail API.
SMTP is Associate in Nursing signifier for straightforward Mail Transfer Protocol. It provides a mechanism to deliver the e-mail. we are able to use Apache James server, Postcast server, cmail server etc. as Associate in Nursing SMTP server. however if we tend to purchase the host house,Associate in Nursing SMTP server is bydefault provided by the host supplier. as an example, my smtp server is mail.javatportal.com. If we tend to use the SMTP server provided by the host supplier, authentication is needed for causing and receiving emails.
POP is Associate in Nursing signifier for Post workplace Protocol, additionally called POP3. It provides a mechanism to receive the e-mail. It provides support for single mail box for every user. we are able to use Apache James server, cmail server etc. as Associate in Nursing POP server.however if we tend to purchase the host house, Associate in Nursing POP server is by default provided by the host supplier. as an example, the pop server provided by the host supplier for my web site is mail.javatportal.com. This protocol is outlined in RFC 1939.
IMAP is Associate in Nursing signifier for web Message Access Protocol. IMAP is a complicated protocol for receiving messages. It provides support for multiple mail box for every user ,in addition to, mailbox will be shared by multiple users. it's outlined in RFC 2060.
Multiple web Mail Extension (MIME) tells the browser what's being sent e.g. attachment, format of the messages etc. it's not called mail transfer protocol however it's employed by your mail program.
There area unit several protocols that area unit provided by third-party suppliers. a number of themarea unit Network News Transfer Protocol (NNTP), Secure utile web Mail Extensions (S/MIME) etc.
The java application uses JavaMail API to compose, send and receive emails. The JavaMail API uses SPI (Service supplier Interfaces) that gives the intermediatory services to the java application tomanage the various protocols. Let's know it with the figure given below:
There are two bundles that are utilized as a part of Java Mail API: javax.mail and javax.mail.internet bundle. These bundles contains numerous classes for Java Mail API. They are:
We will think about these class one by one when it is getting utilized.