Sending mail using java mail API

Java Mail API is a platform and protocol independent framework to send mail.

It supports JDK 1.4 and above. It supports IMAP, POP3 and SMTP protocol.

To use Java Mail API we have to include javax.mail.jar in your class library.

for this java mail api should be present on your class path.