I have a Java app that sends email via Apache Commons Email. The app works just find on my development environment, but when I deploy it to the server, I'm getting an error that Commons couldn't connect to the email server.
org.apache.commons.mail.EmailException: Sending the email to the following failed : 255.255.255.255 :587 ...Error authenticating with server.
Just to be sure this wasn't my configuration, I've tried on 2 different email providers, 1) Our email company email provider 2) Gmail. Both work on my dev and both fail with the same message on the server.
I've tried several ports and IP combinations. I've turned SSL on and off. I've checked with our email provider. I'm left with a configuration of either the server or the network.
I work remotely so I'm not on the same network as our servers, but I the app works for me even if I am on VPN.
I've used telnet from within the server and I can connect to the email provider on the proper port.
Does anyone have anything else I can try? Thanks.
Edit The error I'm getting is an authentication error. Could there be a security setting to prevent the credentials from being passed?