Skip to content
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

Enhancement: Simple Java Mail should throw an exception when trying to utilize S/MIME with smime-module on the classpath #442

Closed
JacekMazovia opened this issue Feb 8, 2023 · 3 comments

Comments

@JacekMazovia
Copy link

JacekMazovia commented Feb 8, 2023

Hey,
I was trying to configure SMIME signing of mail. Finally succedded. But had problem that I used functions signWithSmime(). But saw no effect. Maybe it would be nice to add some note in documentation in the section "Signing / encrypting emails with S/MIME".

Maybe something like:

!! If you don't have class (...) from ..jar the signing won't work but print no error.

Later I found in source code fragment:

MimeMessageProducer : 
if (ModuleLoader.smimeModuleAvailable()) {
    message = ModuleLoader.loadSmimeModule().signAndOrEncryptEmail(session, (MimeMessage)message, email);
}
@bbottema
Copy link
Owner

bbottema commented Feb 8, 2023

Well, it is pretty clearly stressed in the documentation that it requires the smime-module.

image

But I do agree that it might be better to log a warning, if it's not there already.

@JacekMazovia
Copy link
Author

Nevertheless. Thanks for great library.

@bbottema bbottema changed the title SMIME documentation - silent no class on classpath Enhancement: Simple Java Mail should throw an exception when trying to utilize S/MIME with smime-module on the classpath Feb 9, 2023
@bbottema
Copy link
Owner

bbottema commented Feb 9, 2023

I've clarified the documentation a bit further and Simple Java Mail will now fail with an exception when trying to use S/MIME without the smime-module loaded. Just like how it works for the other modules.

Released in 7.8.2. Thank you for reporting!

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

No branches or pull requests

2 participants