my dog learned polymorphism*
The moose likes Tomcat and the fly likes JavaMail with Tomcat? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JavaMail with Tomcat?" Watch "JavaMail with Tomcat?" New topic
Author

JavaMail with Tomcat?

Neil Jenman
Greenhorn

Joined: Apr 01, 2004
Posts: 3
I have written a simple servlet to log into a pop3 server and check from mail (code straight out of a wrox book). It works fine on myjavaserver.com, however when I download the servlet to my local tomcat and run it i recieve the following error:
javax.mail.AuthenticationFailedException
Is there something that need to be setup in tomcat to allow pop access through its webapps? all other api's work within the webapp (such as jdbc) but any JavaMail based servlet fails.
I'm really stuck on this one and any help would really be appriciated!
Thanks
NJ
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
According to the JavaDocs, this means your user name or password failed.
Possibly due to the policy at the mailserver you are attempting to connect to. This happened to me once when I tried to use a "from" email address that the server did not like.
Unless you have implemented a SecurityManager, Tomcat does not care about such things.
You can set up your own mailserver with the Jakarta "James" toolkit.
Bill
Neil Jenman
Greenhorn

Joined: Apr 01, 2004
Posts: 3
What is a SecurityManager?
The servlet returns the same error even if i enter the mail server address incorrectly so it can't be a policy on the mail server as it does not get that far.
Also the servlet works on MyJavaServer.com so the mailserver must except connections from an app using javamail api.
The only think i can think of is a tomcat config prob but i have no idea what?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail with Tomcat?