It's not a secret anymore!
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JavaMail with Tomcat?" Watch "JavaMail with Tomcat?" New topic

JavaMail with Tomcat?

Neil Jenman

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, however when I download the servlet to my local tomcat and run it i recieve the following error:
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!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13028
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.
Neil Jenman

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 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:
subject: JavaMail with Tomcat?
jQuery in Action, 3rd edition