Hello,
I unjar the mail.jar file and place in the lib folder. Then also i am
getting the same error.
Regards
SRK
> Hello,
> It looks to me, you're missing your javamail.providers and
j> avamail.address.map file. These two files should be in:
> JAVA_HOME/lib/
> OR
> META-INF/
>
T> his file comes with your mail.jar file. So, you should unjar your
m> ail.jar file and you will find:
> javamail.default.address.map
j> avamail.default.providers
> copy them to your JAVA_HOME/lib and rename them as
> javamail.providers
j> avamail.address.map
>
n> o need to edit this file, unless your writing your own service
providers.
Y> our application can not find the service providers.
> regards,
>
>
>> Hi There,
> > I am getting no provode error whileconnectiong to INBOX. Please find
the
E> > rror Message and samle code
> > Thnaks
> > Regards
> > SRK
> > Error Message
-> > -----------
> > Exception in thread "main" javax.mail.NoSuchProviderException: No
p> rovider
f> > or 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 Mail.main(Mail.java:13)
> >
S> > ample code
-> > ----------
> >
i> > mport javax.mail.*;
i> > mport javax.mail.internet.*;
> > public class Mail
{> >
p> > ublic static void main (String args[]) throws Exception
> > {
> > Session session = Session.getInstance(System.getProperties(),
n> > ull);
> > Store store = null;
> > store = session.getStore("pop3");
> > store.connect("pop3.freeserve.net", "xxx@f...", "xxx");
> >
> > Folder folder = store.getFolder("INBOX");
> > folder.open(Folder.READ_ONLY);
> > int count = folder.getMessageCount();
> > System.out.println("Messages waiting: " + count);
> > count = folder.getUnreadMessageCount();
> > System.out.println("Unread messages waiting: " + count);
> > folder.close(false);
> > store.close();
> > }