cancel
Showing results for 
Search instead for 
Did you mean: 

No provider for imaps for Reading Email in Webdynpro

Former Member
0 Kudos

Hi Experts,

We wrote JavaMail API to read Gmail emails within the WD. When we run the application from WD I got the following exception. When we run as standalone application using JDK1.4.2_07 and JDK1.4.2_19, it works fine. it looks like security provider class missing or not loaded in to the Web AS Java.

Is there jar file which i have to added to the project?

No provider for imaps

javax.mail.Session.getProvider(Session.java:289)

I appreciate your help.

Thanks,

Ramana.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for quick reply.

I tried using the below code. I still get the "no provider for imaps" at store.connect method. it works when I run as standalone program. I get the below error when run from WD. It seems like some jar file missing with in the proj class path.

String host = "imap.gmail.com";

String username = "xxxxx"

String password = "xxxxx";

Properties props = System.getProperties();

props.put( "domain", "true" );

//Class.forName("com.sun.net.ssl.internal.ssl.Provider");

Context initialContext = new InitialContext( props );

Session session = ( Session )initialContext.lookup( "java:comp/env/mail/MailSession" );

//Session session = Session.getInstance(props);

Store store = session.getStore("imaps");

store.connect(host,username,password); //

Thanks,

Ramana.

Former Member
0 Kudos

Hi,

Use this one

javax.mail.Session object

Regards,

sunaina Reddy T

former_member192434
Active Contributor
0 Kudos