pwm
pwm copied to clipboard
Mail session creation does not specify SMTP protocol
Describe the bug
When creating a mail session, EmailServerUtil does not specify the mail.transport.protocol property, as expected according to the Session javadoc.
This might work in some environments, depending on their defaults, but when running on Jetty 9.4.x, it causes EmailService.getSmtpTransport to fail with ERROR_SERVICE_UNREACHABLE, complaining of a null protocol.
To Reproduce Steps to reproduce the behavior:
- Download the latest Jetty 9.4 from https://www.eclipse.org/jetty/download.html
- Build the PWM WAR file and copy to the Jetty webapps directory.
- Go to PWM in a web browser and set it up with at least one user.
- Go to /pwm/public/forgottenpassword and attempt to reset the password for the user.
- No email is sent. Checking the logs shows error 5057 Service Unreachable.
Expected behavior A password reset email should be sent.
Desktop:
- OS: Solaris
- Browser: Firefox
- Version: 76
Additional context This started causing us problems with commit 050c9337d6251e290f3f585d3ddfd634b664d618