Authenticate using SSL over SMTP
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   techie_prince
Posted On:   Wednesday, March 9, 2005 08:10 PM

I am trying to send mail using SSL authentication over SMTP.I have created the session using the properties: props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.host", "smtp.gmail.com"); props.setProperty("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.port", "465"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.socketFactory.fallback", "false"); When i try to authenticate i get the following exception: javax.mail.AuthenticationFailedException    More>>

I am trying to send mail using SSL authentication over SMTP.I have created the session using the properties:



props.put("mail.transport.protocol", "smtp");

props.put("mail.smtp.host", "smtp.gmail.com");

props.setProperty("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");

props.put("mail.smtp.port", "465");

props.put("mail.smtp.auth", "true");

props.put("mail.smtp.socketFactory.fallback", "false");



When i try to authenticate i get the following exception:



javax.mail.AuthenticationFailedException

at javax.mail.Service.connect(Service.java:264)

at javax.mail.Service.connect(Service.java:134)

at javax.mail.Service.connect(Service.java:86)

at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:144)

at javax.mail.Transport.send0(Transport.java:150)

at javax.mail.Transport.send(Transport.java:80)

at com.transversalnet.mail.SSLMails.sendMail(SSLMails.java:190)

at com.transversalnet.mail.SSLMails.main(SSLMails.java:205)




Please help me to solve this problem

   <<Less
About | Sitemap | Contact