JavaMail and Outlook/Exchange 2000
Hi I know that there have been many simular requests to my question, but I have not found many answers, so I will post my question in the hopes that there is a good answer.
1) I can send email both within and outside of my domain, but I am unable to read mail. I get following error message:
javax.mail.NoSuchProviderException: No provider for POP3
at javax.mail.Session.getProvider(Session.java:249)
at javax.mail.Session.getStore(Session.java:323)
at javax.mail.Session.getStore(Session.java:303)
at javax.mail.Session.getStore(Session.java:289)
at weather.GetMessageExample.main(GetMessageExample.java:22)
Exception in thread "main"
this is the code that is above the error message:
package weather;
import java.io.*;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class GetMessageExample {
public static void main (String args[]) throws Exception {
// String host = args[0];
// String username = args[1];
// String password = args[2];
// Create empty properties
Properties props = new Properties();
props.put("mail.transport.protocol", "IMAP4");
props.put("mail.store.protocol", "POP3");
// Get session
Session session = Session.getDefaultInstance(props, null);
// Get the store
Store store = session.getStore();
The error occurs here ^^^^^
Thanks
Aaron

