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

Apache common-email lib - TLS shows warning

$
0
0

I am using Apache common-email lib. And my SMTP server requires me to endable TLS protocol.

However, doing so gives me a warning that this particular method deprecated. Would someone please let me know an alternative to this?

import org.apache.commons.mail._
val commonsMail = new SimpleEmail().setMsg(mail.message)
commonsMail.setHostName("smtp.office365.com")
commonsMail.setSmtpPort(25)
commonsMail.setTLS(true) //This line shows warning. 

Viewing all articles
Browse latest Browse all 29748

Trending Articles



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