This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes javax.mail.NoSuchProviderException: smtp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "javax.mail.NoSuchProviderException: smtp" Watch "javax.mail.NoSuchProviderException: smtp" New topic

javax.mail.NoSuchProviderException: smtp

Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
Seems this is a common issue, unfortunately, I tried a bunch of things I found via search but no luck. I upgraded an application (including some jars) that was using javax.mail. The old version still works, but even with all the same code and parameters, the new version fails. The working version uses j2ee-1.3.1.jar, I've tried using that as well as mail.jar 1.4.2 and smtp.jar. I've dropped the default provider list in the /META-INF directory and no changes either. I've turned on debugging and here's the output of the failing verison:

And here's the output of the working version:

What else should I try?


SCJP 1.5
Shawn Kuenzler
Ranch Hand

Joined: Apr 16, 2006
Posts: 73
I resolved the issue. I had to add both Activation.jar and Mail.jar to my classpath and remove all .class files from the javax/mail package within J2EE-1.3.1.jar that was also on the classpath. Not sure what caused the conflict.
wood burning stoves
subject: javax.mail.NoSuchProviderException: smtp
Similar Threads
Java mail
Must issue a starttls command
JavaMail not sending emails all the time
My Application is not sending mail to external servers
External Mail "javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart"