Skip to content

Add option to configure smtp debug printer #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
michal-krajewski opened this issue Mar 12, 2025 · 0 comments
Open

Add option to configure smtp debug printer #589

michal-krajewski opened this issue Mar 12, 2025 · 0 comments

Comments

@michal-krajewski
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant