local.setProperty("mail." + getBaseProtocol() + ".rsetbeforequit", "true");
}
protected SessionDetails newSession(ImmutableEndpoint endpoint) throws UnsupportedEncodingException
{
URLName url = urlFromEndpoint(endpoint);
Properties global = System.getProperties();
Properties local = new Properties();
//Allow properties to be set on the endpoint
PropertiesUtils.getPropertiesWithPrefix(endpoint.getProperties(), "mail.", local);
Session session;
// make sure we do not mess with authentication set via system properties
synchronized (global)
{
extendPropertiesForSession(global, local, url);
session = Session.getInstance(local, getAuthenticator());
}
if (logger.isDebugEnabled())
{
local.setProperty("mail.debug", "true");
dumpProperties("MuleSession local properties", local, true);
dumpProperties("System global properties", global, true);
logger.debug("Creating mail session: host = " + url.getHost() + ", port = " + url.getPort()
+ ", user = " + url.getUsername() + ", pass = " + url.getPassword());
}
return new SessionDetails(session, url);
}