Share This Tutorials Via Google Plus or Facebook (Help Friends)          

                                                            

                                                 





Pinterest

Java Mail API
The JavaMail is an API that is used to compose, write and read electronic messages. The JavaMail API provides protocol-independent and plateform-independent framework for sending and receiving mails. The javax.mail and javax.mail.activation packages contains the core classes of JavaMail API.
The JavaMail facility can be applied to many events. It can be used at the time of registering the user (sending notification such as thanks for your interest to my site), forgot password (sending password to the users email id), sending notifications for important updates etc. So there can be various usage of java mail api.
Protocols used in JavaMail API

There are some protocols that are used in JavaMail API.

  • SMTP
  • POP
  • IMAP
  • MIME
  • NNTP and others

SMTP

SMTP is an acronym for Simple Mail Transfer Protocol. It provides a mechanism to deliver the email. We can use Apache James server, Postcast server, cmail server etc. as an SMTP server. But if we purchase the host space, an SMTP server is bydefault provided by the host provider. For example, my smtp server is mail.careerbuzz.com. If we use the SMTP server provided by the host provider, authentication is required for sending and receiving emails.
POP

POP is an acronym for Post Office Protocol, also known as POP3. It provides a mechanism to receive the email. It provides support for single mail box for each user. We can use Apache James server, cmail server etc. as an POP server. But if we purchase the host space, an POP server is bydefault provided by the host provider. For example, the pop server provided by the host prvider for my site is mail.careerbuzz.com. This protocol is defined in RFC 1939.
IMAP

IMAP is an acronym for Internet Message Access Protocol. IMAP is an advanced protocol for receiving messages. It provides support for multiple mail box for each user ,in addition to, mailbox can be shared by multiple users. It is defined in RFC 2060.
MIME

Multiple Internet Mail Extension (MIME) tells the browser what is being sent e.g. attachment, format of the messages etc. It is not known as mail transfer protocol but it is used by your mail program.
NNTP and Others

There are many protocols that are provided by third-party providers. Some of them are Network News Transfer Protocol (NNTP), Secure Multipurpose Internet Mail Extensions (S/MIME) etc.
JavaMail Architecture

The java application uses JavaMail API to compose, send and receive emails. The JavaMail API uses SPI (Service Provider Interfaces) that provides the intermediatory services to the java application to deal with the different protocols.

JavaMail API Core Classes

There are two packages that are used in Java Mail API: javax.mail and javax.mail.internet package. These packages contains many classes for Java Mail API. They are:

 

  • javax.mail.Session class
  • javax.mail.Message class
  • javax.mail.internet.MimeMessage class
  • javax.mail.Address class
  • javax.mail.internet.InternetAddress class
  • javax.mail.Authenticator class
  • javax.mail.PasswordAuthentication class
  • javax.mail.Transport class
  • javax.mail.Store class
  • javax.mail.Folder class etc.

We will know about these class one by one when it is getting used.

 

Share and Enjoy

  • Facebook

                                                                                                                                                                                           



Find Us on Facebook   



Recent Posts                



(2+ Years) "JP Morgan" Hiring: UX Designer On Jan 2017 @ Bangalore (Freshers) "Vodafone" Hiring: Backend Developer On Jan 2017 @ Pune (0 - 1 Years) "WowTables" Hiring: Front End Developer On Jan 2017 @ Mumbai (0 - 1 Years) "ManavManagement" Hiring: Female Counselor On Jan 2017 @ Faridabad (Freshers) "Social Beat" Hiring: Content Specialist On Jan 2017 @ Chennai (Freshers) "Barclays" Hiring: Developer On Jan 2017 @ Pune 0 - 3 Years) "Worldindia" Hiring: Web Administrator On Jan 2017 @ Mumbai (1 - 3 Years) "Etech Global" Hiring: .NET MVC Developer On Jan 2017 @ Baroda (3+ Years) "TheLogicFactory" Hiring: .NET Application Developer On Jan 2017 @ Ahmedabad (2 - 5 Years) "Tecra" Hiring: Software Engineer On Jan 2017 @ Hyderabad (2 - 4 Years) "Mphasis" Hiring: Testing Engineer On Jan 2017 @ Bangalore (3 - 5 Years) "Wipro" Hiring: Test Engineer On Jan 2017 @ Mumbai (3 - 5 Years) "Wipro" Hiring: Developer Core Java On Jan 2017 @ Bangalore (1 - 2 Years) "Nelito Systems" Hiring: Application Support Engineer On Jan 2017 @ Mumbai (Freshers) "RBS" Hiring: Senior Test Designer LastDate: 31st Jan 2017 @ Gurgaon (Fre/Exp) "Cisco" Hiring: Business Intelligence Analyst On Jan 2017 @ Bangalore (2 - 3 Years) "Amdocs" Hiring: Software Developer On Jan 2017 @ Pune (0 - 2 Years) "Emblix Solutions" Hiring: PhotoShop Designer On Jan 2017 @ Hyderabad (0 - 1 Years) "KD Groups" Hiring: Hr Trainee On Jan 2017 @ Gurgaon (0 - 2 Years) "SavvyonWeb" Hiring: Content Writer On Jan 2017 @ Noida (0 - 1 Years) "Signa" Hiring: Jr. Web Developer/Hr Executive On Jan 2017 @ Hyderabad (Freshers) "Zen Technologies" Hiring: Software Engineer On Jan 2017 @ Hyderabad (1 - 3 Years) "Geometric" Hiring: Teamcenter QA On Jan 2017 @ Pune (1 Years) "Rudra Softech" Hiring: Content Writer On Jan 2017 @ Ahmedabad (2 - 4 Years) "RAVSoft Solutions" Hiring: Software Engineer On Jan 2017 @ Chennai

Copyright © 2010 - 2012 . All rights reserved.
Please Note: careerbuzz.in is not in any way responsible for any consequences of you applying for a job through the vacancies listed on this site. Please do thorough research before applying. We take utmost care in publishing jobs on this site. While every care has been taken to avoid mistakes and errors on the web pages, careerbuzz.in shall not be liable to any person in any manner whatsoever by reason of any error or omission which might have crept in unintentionally
www.careerbuzz.in
Hi..VOTE US?