JavaMail
Java and E-mail
- There are a few different ways:
- SmtpClient - Opens a socket connection to a mail server
and communicates using the smtp, a low-level protocol. [ Moss.382 ]
In sun.net.smtp.SmtpClient, so it is unsupported as vendors need not port
it to their machine.
- JavaMail API - Useful package for mail.
- Free Mail classes built on a low-level protocol.
Emphasis is on how to find the data and not what to find.
JavaMail API
- javax.mail
The main classes are [ Moss.387 ]
- javax.mail.Message : defines addressing info and content type.
- javax.mail.Folder : defines methods that fetch, coy, apped and
delete messages of a folder.
- javax.mail.Store : defines DB which holds messages and folders.
- javax.mail.Sesssion : authenticates users and controls access to
message store.
session = Session.getDefaultInstance(props, null);
- javax.mail.event
- javax.mail.internet
- javax.mail.search
jmail.java
Illustrates the Steps of JavaMail
[ Index ]