You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
The default behaviour of Jakarta Mail is to push smtp debug logs to std out. It's not a viable solution for my use case; I need to redirect these logs to the Slf4j logger.
To achieve that, I'm accessing Session object directly and setting a custom printer: mailer.getSession().setDebugOut(new Slf4jPrinter(logger));
(the printer is my custom implementation)
Enhancement:
Allow configuring the debug printer directly in the configuration .withDebugPrinter(printer)
Activity
bbottema commentedon Jul 4, 2026
Implemented in by adding configurable Jakarta Mail debug output handling.
Java builder, using the built-in SLF4J target:
Properties-only configuration:
Spring Boot style alias:
Custom Java printer remains available:
Built-in values are
STDOUT,STDERR, andSLF4J. TheSLF4Jtarget writes to loggerorg.simplejavamail.javamail.debugat debug level.feat(mailer): configure Jakarta Mail debug output (#589)
bbottema commentedon Jul 8, 2026
Released in Simple Java Mail v9.0.0, which is now available from Maven Central:
https://repo1.maven.org/maven2/org/simplejavamail/simple-java-mail/9.0.0/
Release notes:
https://github.com/bbottema/simple-java-mail/releases/tag/9.0.0