I am using JavaMail set send email via Microsoft Exchange Server.
When I run this program, it show this error message:
The code snippet looks like:
You need to set mail.smtp.ssl.trust in your JavaMail properties.
If set, and a socket factory hasn't been specified, enables use of a MailSSLSocketFactory.
If set to "*", all hosts are trusted.
If set to a whitespace separated list of hosts, those hosts are trusted. Otherwise, trust depends on the certificate the server presents.
The updated code snippet looks like: