Hi Ramesh,
Try this, While adding the Properties add both the hosts
props.put("mail.smtp.host", (String)emailConfigValues.get("SMTPHOST") ); // for
sending mails
-add the correct pop hostname name
props.put("mail.pop3.host", (String)emailConfigValues.get("POP3HOST") ); // for
receiving mails
Hope it may help..
Cheerz
G S Sundaram
While
"Ramesh, Kesav" wrote:
> Hi all,
>
> i am trying to create a separate folder using JAVA MAIL API. but i am
> getting the following error.
>
> my code segment for creating the folder is as below . can you let me know
> what is wrong with the code.
>
> store=ses.getStore("usplm001.examhub.exch.eds.com");
> folder=store.getFolder("INBOX");
> folder.open(Folder.READ_ONLY);
> messages=folder.getMessages();
> for(int i=0;i<messages.length;i++)
> {
> System.out.println("From:"+messages[i].getFrom()[0]+"\n" +"
> subject:"+messages[i].getSubject()+"\n");
> }
> folder.close(false);
> store.close();
>
> and the exception i am getting ois as follows
>
> javax.mail.NoSuchProviderException: No provider for
> usplm001.examhub.exch.eds.com
> at javax.mail.Session.getProvider(Session.java:249)
> at javax.mail.Session.getStore(Session.java:323)
> at javax.mail.Session.getStore(Session.java:303)
> at sendMailServlet.doPost(sendMailServlet.java:91)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> at com.sun.server.ServletState.callService(ServletState.java:204)
> at
> com.sun.server.ServletManager.callServletService(ServletManager.java:940)
> at com.sun.server.http.InvokerServlet.service(InvokerServlet.java:101)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> at com.sun.server.ServletState.callService(ServletState.java:204)
> at
> com.sun.server.ServletManager.callServletService(ServletManager.java:940)
> at
> com.sun.server.webserver.HttpServiceHandler.handleRequest(HttpServiceHandler
> .java:455)
> at
> com.sun.server.webserver.HttpServiceHandler.handleRequest(HttpServiceHandler
> .java:212)
> at com.sun.server.HandlerThread.run(HandlerThread.java:154)
>
> Regards
>
> Ramesh Kesavanarayanan
>
> Electronic Data Systems
> Steeple Reach,
> 25, Cathedral Road,
>
> 91-44-811 3801 to 15 ext :2186
> 91-44-233 0380 (res)
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html