-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Bug: wrong username property used when password authentication is not needed #429
Comments
Hmm, it seems you're on to something. For authenticated SMTP servers this is not an issue, as the property is ignored in that case. For SMTP users that don't require a password though, the property is used and it looks like it is the wrong property. I'm still looking into how this is possible, because that property is a core mechanic since the start of the library. It's possibly one of the least tested functions though (passwordless connections). I'll get back to this. |
Your use case is a strange one though; either an SMTP sever requires authentication or it doesn't. If it does, a password is required and then everything is fine as I said. However, if there is no authentication needed by the server, the user name is not necessarily required. I suppose it depends on the server implementation how it deals with missing username, but the test server Wiser, which I use in my junit tests, doesn't have any issue no matter the configuration. The property used in case of missing password is wrong though, so I'll release a new version with the fix for that at least. |
…karta documentation. This is the default user property in case manual authenticator is not used (which is the case with Simple Java Mail if a password was not provided by the user)
Release fix in 7.5.2. Give it a spin! |
Thank you and happy new year!
Em domingo, 25 de dezembro de 2022 08:43:01 BRT, Benny Bottema ***@***.***> escreveu:
Release fix in 7.5.2. Give it a spin!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hello! I faced some problem using Simple Java Mail, version 7.5.1, about the prop username.
When passing the prop username, Jakarta Mail does not recognize it. Debugging the code, I found this: in class org.simplejavamail.api.mailer.config.TransportStrategy line 104:
On the other hand, in jakarta, class jakarta.mail.Service, line 112:
Simple Mail uses mail.smtp.username, but Jakarta uses mail.smtp.user. Furthemore, I faced an exception about authentication.
To solve this, I found two ways:
So is this problem or is it an error I am causing?
Thanks in advance!
The text was updated successfully, but these errors were encountered: