aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Error while sending email through java.mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Error while sending email through java.mail" Watch "Error while sending email through java.mail" New topic
Author

Error while sending email through java.mail

rahamath basha
Greenhorn

Joined: Oct 20, 2004
Posts: 1
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
at javax.mail.Session.loadProvidersFromStream(Session.java:901)
at javax.mail.Session.access$0(Session.java:898)
at javax.mail.Session$1.load(Session.java:852)
at javax.mail.Session.loadResource(Session.java:1035)
at javax.mail.Session.loadProviders(Session.java:871)
at javax.mail.Session.<init>(Session.java:191)
at javax.mail.Session.getDefaultInstance(Session.java:280)
at SendEmail.SendMessage(SendEmail.java:37)
at SendEmail.main(SendEmail.java:15)
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

In order to use JavaMail you need to include the JavaMail jar (mail.jar) in your classpath. Its got all the implementing classes (including com.sun.mail.util.LineInputStream) - if you have done this, check you mail.jar is not corrupt.
[ October 20, 2004: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Moving this to the "Other API's" forum where they discuss Java Mail quite often.

Please post your replies there, thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while sending email through java.mail