This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi All, I have a question regarding sending javamail from my web app. I have the web app working on a server, and the mail host on a differant server. I am guessing that this is OK, but cannot seem to get it all to work. The web app doesn't have to be on the same server as the mail host does it?
The trouble I am having is I am getting an Authentication error. I have posted this problem in the "otherAPI" forum, but it is now appearing to be mostly a tomcat config issue,so hope it is OK to post it new here.
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth true javax.mail.AuthenticationFailedException at javax.mail.Service.connect(Service.java:319) at javax.mail.Service.connect(Service.java:169) at javax.mail.Service.connect(Service.java:118) at javax.mail.Transport.send0(Transport.java:188) at javax.mail.Transport.send(Transport.java:118)
Does anyone see anything obvious that I am doing wrong? Thanks very much.
[ March 18, 2008: Message edited by: Kim Kantola ] [ March 18, 2008: Message edited by: Kim Kantola ]
Thanks Ben, I thought this would be OK (See my quote from below) when I had thought about this long enough to realize it was more of a tomcat problem than a java api problem.
I have posted this problem in the "otherAPI" forum, but it is now appearing to be mostly a tomcat config issue,so hope it is OK to post it new here.
What is most confusing to me is that I can use this method for a non - tomcat app, run on one server and connect and send email from another server on another network. however, I cannot get this to work from tomcat. Maybe the mail host has to be on the same server or at least on the same network?