cancel
Showing results for 
Search instead for 
Did you mean: 

javax.mail.NoSuchProviderException: smtp while sending mails

Amey-Mogare
Contributor
0 Kudos

Dear all,

I am trying to send mail using Java Mail API with following code:-

I have created a external Library DC to wrap mail.jar, activation.jar and smtp.jar. And I have added both these DCs (java DC n ext Lib DC) to used DCs of J2E Server Component DC.

When I am trying to run this application, I am getting javax.mail.NoSuchProviderException: smtp exception. Can anybody tell me what could be the problem here??

I have written same code in session bean of a EJB DC and I am successfully able to send mails through Web Service navigator.

But when I am trying it from portal (Guided Procedure Callable Object), I am getting the above error.

Pls help.

Thanks and regards,

Amey Mogare

Edited by: Amey Mogare on Feb 10, 2009 2:24 PM

Accepted Solutions (1)

Accepted Solutions (1)

ravindra_bollapalli2
Active Contributor
0 Kudos

hi

check this

/people/sap.user72/blog/2005/06/01/how-to-perfom-mailing-in-portal-using-dynpage

this may due to jar files missing in the classpath

/message/437800#437800 [original link is broken]

http://www.coderanch.com/t/271336/Other-Java-APIs/java/NoSuchProviderException-smtp

let me know am i reached ur requirement

bvr

Amey-Mogare
Contributor
0 Kudos

Hi bvr,

Thanks for those links, it worked !!!

Thanks and ragards,

Amey Mogare

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you are giving correct SMTP host address, then it is happening because of the required jar files not in classpath. Please find more information in following forum

Hope this will helpful for you

Thanks

Ravindra