MineMessage message=new MineMessage(session);
There are some methods used in MineMessage, they areAddress address=new InternetAddress(splessons@gmail.com);
Where the internet address class is subclass to address class. And also possible to create address by sending name along with email id.
Address address=new InternetAddress(splessons@gmail.com, splessons);
To set the fields while sending an email have to follow the following steps
PasswordAuthentication aut=new PasswordAuthentication("splesson", "password");
Here the passwordAuthentication is subclass to Authentication class. Transport.send(message);
There is another way to send or transfer message through the session object along with username and password and close connection.Store s = session.getStore("pop3");
Store.connect(host, username, password);