Skip to Content
avatar image
Former Member

No provider for imaps for Reading Email in Webdynpro

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 16, 2009 at 06:08 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 06:15 AM

    Hi,

    Use this one

    javax.mail.Session object

    Regards,

    sunaina Reddy T

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 16, 2009 at 08:51 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded