@ SuppressFBWarnings ( "LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE" ) public static void enableJavaxMailDebugging ( final boolean bDebug ) { java . util . logging . Logger . getLogger ( "com.sun.mail.smtp" ) . setLevel ( bDebug ? Level . FINEST : Level . INFO ) ; java . util . logging . Logger . getLogger ( "com.sun.mail.smtp.protocol" ) . setLevel ( bDebug ? Level . FINEST : Level . INFO ) ; SystemProperties . setPropertyValue ( "mail.socket.debug" , bDebug ) ; SystemProperties . setPropertyValue ( "java.security.debug" , bDebug ? "certpath" : null ) ; SystemProperties . setPropertyValue ( "javax.net.debug" , bDebug ? "trustmanager" : null ) ; }
Enable or disable javax . mail debugging . By default debugging is disabled .