InterviewSolution
| 1. |
What Is Transport In Javamail Api? |
|
Answer» This is final PART of SENDING Email, it is an abstract CLASS. Default version of this class can be used by calling static send() method. Transport.send(message); Or can create a specific INSTANCE from the session for defined protocol. message.saveChanges(); Transport transport = session.getTransport("smtp"); transport.connect(host, username, PASSWORD); transport.sendMessage(message, message.getAllRecipients()); transport.close(); This is final part of sending Email, it is an abstract class. Default version of this class can be used by calling static send() method. Transport.send(message); Or can create a specific instance from the session for defined protocol. message.saveChanges(); Transport transport = session.getTransport("smtp"); transport.connect(host, username, password); transport.sendMessage(message, message.getAllRecipients()); transport.close(); |
|