Esempio n. 1
0
 /**
  * Returns a newly allocated Session object from the given Properties
  *
  * @param properties a <code>Properties</code> value
  * @return a <code>javax.mail.Session</code> value initialized from the given properties
  */
 public javax.mail.Session newSessionForContext(Properties properties, String contextString) {
   if (_delegate != null) {
     _delegate.willCreateSessionWithPropertiesForContext(properties, contextString);
   }
   javax.mail.Session session = javax.mail.Session.getInstance(properties);
   if (_delegate != null) {
     _delegate.didCreateSession(session);
   }
   session.setDebug(debugEnabled());
   return session;
 }