• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail Proplem

 
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
Pie
Posts: 20494
54
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic