This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes TLS security in email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "TLS security in email" Watch "TLS security in email" New topic
Author

TLS security in email

raj kala
Greenhorn

Joined: May 07, 2007
Posts: 3
I have an email program as follow. The email program has one line where it enables TLS security.
If i set the value to true, and just run the program separately (not from the application) it is working fine. however if i bundle it up in a web application and deploy on weblogic server it is not working.If I disable to security it is working fine from the webapplication.


Properties props = new Properties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", hostServer);
props.put("mail.smtp.connectiontimeout", new Integer(60000));
props.put("mail.smtp.timeout", new Integer(60000));

//props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.starttls.enable","false");


Can some one tell me the reason.

Here is the error message
MessagingException: javax.mail.MessagingException Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 
Consider Paul's rocket mass heater.
 
subject: TLS security in email
 
Similar Threads
Confusion over SSL and TLS for sending mail thorugh JAVA Mail API
java.mail without specifying SMTP server
how to send mail using gmail server
problem in mailing with smtp server
send email using gmail account