• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Mail Proplem  RSS feed

 
Micale Raj
Ranch Hand
Posts: 30
Hibernate IntelliJ IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm new to Java Mail API. I'm trying to read INBOX using following code. But it throws javax.mail.NoSuchProviderException: invalid provider at session.getStore("smtp");




I get following Stack trace



Please suggest me something on this. Am i missing something???

Thanks
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SMTP is for sending only, and does not have a store. To get access to the inbox you will need to use IMAP, POP3 or another protocol for reading mail, not sending it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!