Today we learned that for our two clients JavaMail is not authenticated, so our product cannot send email. We have been sending emails through our own server for many years, as well as for several other clients, and we thought that we use authentication for all of these.
The code runs as follows:
transport = session.getTransport("smtp");
transport.connect(hostName, port, user, password);
According to the documentation here , JavaMail should use authentication if we used this form of the connect () method. We do not set any properties, but if I read this page correctly, we do not need to.
We use mail.jar from JBoss 4.2.1.GA.
What do we need to do differently?
Refresh . If I use a different method on this documentation page (by setting the mail.smtp.auth property and providing Authenticator), authentication will finally work. But what are we doing wrong with this method?
source
share