Search in sources :

Example 1 with TransportStrategy

use of org.simplejavamail.mailer.config.TransportStrategy in project simple-java-mail by bbottema.

the class MailSender method logSession.

/**
 * Simply logs host details, credentials used and whether authentication will take place and finally the transport protocol used.
 */
private static void logSession(final Session session) {
    final TransportStrategy transportStrategy = TransportStrategy.findStrategyForSession(session);
    final Properties properties = session.getProperties();
    final String sessionDetails = (transportStrategy != null) ? transportStrategy.toString(properties) : properties.toString();
    LOGGER.debug("starting mail with " + sessionDetails);
}
Also used : TransportStrategy(org.simplejavamail.mailer.config.TransportStrategy) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)1 TransportStrategy (org.simplejavamail.mailer.config.TransportStrategy)1