|
|
|
@ -35,8 +35,14 @@ public class MailUtil {
|
|
|
|
|
//email.setSSL(true);
|
|
|
|
|
|
|
|
|
|
email.setHostName(XxlJobAdminConfig.getAdminConfig().getMailHost());
|
|
|
|
|
|
|
|
|
|
if (XxlJobAdminConfig.getAdminConfig().isMailSSL()) {
|
|
|
|
|
email.setSslSmtpPort(XxlJobAdminConfig.getAdminConfig().getMailPort());
|
|
|
|
|
email.setSSLOnConnect(true);
|
|
|
|
|
} else {
|
|
|
|
|
email.setSmtpPort(Integer.valueOf(XxlJobAdminConfig.getAdminConfig().getMailPort()));
|
|
|
|
|
//email.setSslSmtpPort(port);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
email.setAuthenticator(new DefaultAuthenticator(XxlJobAdminConfig.getAdminConfig().getMailUsername(), XxlJobAdminConfig.getAdminConfig().getMailPassword()));
|
|
|
|
|
email.setCharset(Charset.defaultCharset().name());
|
|
|
|
|
|
|
|
|
|