aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes JavaMail, SMTP error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JavaMail, SMTP error" Watch "JavaMail, SMTP error" New topic
Author

JavaMail, SMTP error

Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333
I get the following error when I try to send an e-mail using the JavaMail API.
javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:611)
at javax.mail.Session.getTransport(Session.java:541)
at javax.mail.Session.getTransport(Session.java:484)
at javax.mail.Session.getTransport(Session.java:464)
at javax.mail.Session.getTransport(Session.java:519)

I have configured the SMTP Host, user name, and password properly. I've also got the necessary jar files in my classpath.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Can you post your code?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Kedar Dravid
Ranch Hand

Joined: May 28, 2004
Posts: 333


Note that some parts of the code(the one where Criteria object is used) use the Torque persistence layer. You may ignore this part as this is used only for retrieving database records. Also, for security purposes, I have changed the SMTP host and user-name/password. Of course, I've configured these values correctly in the code thta I shall actually be using.
[ April 11, 2005: Message edited by: Kedar Dravid ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaMail, SMTP error