Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29918

is starttls.enabled = true is safe for mail sending from java code?

$
0
0

I'm sending emails from java code.My configuration is

 props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.host", "****");  props.put("mail.smtp.auth", "true"); props.put("mail.smtp.port", "587");

On my other questionEJP answered

Any protocol that uses STARTTLS is in SSL mode after the STARTTLS command is issued

But my debug output shows:DEBUG SMTP: trying to connect to host "****", port 587, isSSL false.

So my question sounds like

Is such configuration really safe and uses SSL as EJP said despite of isSSL=false on my debug output?

UPDATE

connecting code

 Transport transport = session.getTransport("smtp"); transport.connect("host", 587,"username", "password");

when I wrote Transport transport = session.getTransport("smtps") I got

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

Viewing all articles
Browse latest Browse all 29918

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>