InterviewSolution
| 1. |
What Is Session In Javamail Api? |
|
Answer» Session is the top-level entry CLASS representing mail session. It USES java.util.Properties object to get information about mail server, username, password etc. This class has a private constructor and you can get session OBJECTS through getInstance() and getDefaultInstance() METHODS. getDefaultInstance() method PROVIDES default Session object which takes Properties and Authenticator objects as arguments. Properties props = new Properties(); Properties props = new Properties(); Session is the top-level entry class representing mail session. It uses java.util.Properties object to get information about mail server, username, password etc. This class has a private constructor and you can get session objects through getInstance() and getDefaultInstance() methods. getDefaultInstance() method provides default Session object which takes Properties and Authenticator objects as arguments. Properties props = new Properties(); Properties props = new Properties(); |
|