I am on Windows 2000 Server and Orion 1.1.37.
I have made sure that I am using the lastest mail.jar and
activation.jar.
I also downloaded the latest pop3.jar. I have tried this with
pop3.jar in both the Orion directory and the Orion/lib directory. I
believe both are correctly seen by Orion as I can not delete the files while
Orion is running telling me that Orion has a hold on them.
I ran a small program outside of Orion setting my classpath to mail.jar,
activation.jar, and pop3.jar straight from the Orion directories that list all
the valid providers open to me and get the following results:
javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems,
Inc]
javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc] javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] After setting up my servlet to read my pop3 server, I get the
following error in my servlet:
MessagingException: javax.mail.NoSuchProviderException: No
provider for pop3
Here is a snippet of my code marked where it
dies:
String smtp =
request.getParameter("smtp");
String pop3 = request.getParameter("pop3"); String user = request.getParameter("user"); String pass = request.getParameter("pass"); System.out.println("smtp: "+smtp); System.out.println("pop3: "+pop3); System.out.println("user: "+user); System.out.println("pass: "+pass); PrintWriter out = response.getWriter(); // Save a default From address defaultFrom = user + "@" + pop3; System.out.println("defaultFrom: "+defaultFrom); // Start the session java.util.Properties properties = System.getProperties(); properties.put("mail.smtp.host", smtp); session = Session.getInstance(properties, null); System.out.println("session: "+session); file://out.println("\nbefore get provider "); // ************************ This following displays in my
console ***************************
System.out.println("getting provider"); Provider provider =
session.getProvider("pop3");
// ************************ This following does NOT display in
my console ***************************
System.out.println("provider: "+provider); ////out.println("\npop3 provider is : "+provider); session.setProvider(provider); System.out.println("session set with pop3 provider"); file://out.println("\nBefore coneecting to pop3 server"); // Connect to the store ////store = session.getStore(provider); ////out.println("store:"+store); store = session.getStore("pop3"); // ************************ I was not sure if the 2
"provider" statements above were required so I tried it with out them and
then the following line does NOT display
***************************
System.out.println("store: "+store); Any help would be appreciated. |