Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java mail use tls 1.2

// add this line mail.smtp.ssl.protocols=TLSv1.2; in properties
// in your Mail Implementation class
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.ssl.protocols","TLSv1.2");

//TO be more specific


Properties prop = new Properties();
prop.setProperty("mail.smtp.auth", "true");
prop.setProperty("mail.smtp.starttls.enable", "true");
prop.setProperty("mail.smtp.ssl.protocols", "TLSv1.2"); // New Line
prop.setProperty("mail.smtp.ssl.trust", mailUri.getHost());
mailSender.setJavaMailProperties(prop);

 
PREVIOUS NEXT
Tagged: #java #mail #tls
ADD COMMENT
Topic
Name
8+9 =