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???
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.