This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Java Mail Proplem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Mail Proplem" Watch "Java Mail Proplem" New topic

Java Mail Proplem

Micale Raj
Ranch Hand

Joined: Jul 01, 2009
Posts: 30

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

Rob Spoor

Joined: Oct 27, 2005
Posts: 19655

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.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Java Mail Proplem
Similar Threads
JavaMail step-by-step
Javamail beginners doubt.
Problem with Retriving mails from INBOX
Email send failure
Java mail with authentication!