No provider for smtp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Huy_Ho
Posted On:   Tuesday, May 29, 2001 06:58 PM

Why my java debugger show "no provider for smtp" when execute command line
Session session = Session.getDefaultInstance(props,null);

Re: No provider for smtp

Posted By:   elango_maragtham  
Posted On:   Tuesday, May 29, 2001 08:00 PM

Set the propeties befor u use ..
I think this may help u ..
use your smtp host in the pplace of mail.smtp.host

Properties props = System.getProperties( ) ;
props.put("mail.smtp.host","smtp.mail.yahoo.com");
props.put("mail.store.protocol","imap");
props.put("mail.transport.protocol","smtp");
Session session = Session.getDefaultInstance(props,null);
About | Sitemap | Contact