Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sending mail with hotmail

843834Nov 13 2007 — edited Sep 15 2010
Hi,
I'm trying to send mails using the hotmail smtp server (smtp.live.com) and the DummySSLSocketFactory and DummyTrustManager given with javamail 1.4.
I set the following properties:

props.setProperty("mail.transport.protocol" , "smtp");
props.setProperty("mail.smtp.host" , "smtp.live.com");
props.setProperty("mail.smtp.port" , "25");
props.setProperty("mail.smtp.auth" , "true");

props.setProperty("mail.smtp.socketFactory.class" ,"com.funambol.hotmail.DummySSLSocketFactory");

props.setProperty("mail.smtp.socketFactory.fallback", "false");
props.setProperty("mail.smtp.socketFactory.port" , "25");
props.setProperty("mail.smtp.starttls.enable", "true");

I'm also using a "dummy" cacert I've previously generated which contains just one entry.
When I try to connect to the mail server the following exception raises:

"javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?"


What can I do to skip any certificate issue ?

thanks,
Pietro
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2010
Added on Nov 13 2007
21 comments
5,467 views