diff --git a/src/main/java/com/msdw/tms/config/EmailUtils.java b/src/main/java/com/msdw/tms/config/EmailUtils.java index cee3b26..1f2e9de 100644 --- a/src/main/java/com/msdw/tms/config/EmailUtils.java +++ b/src/main/java/com/msdw/tms/config/EmailUtils.java @@ -30,6 +30,8 @@ public class EmailUtils { try { HtmlEmail email = new HtmlEmail(); email.setHostName(SERVER_ADDRESS); + email.setSSLOnConnect(true); //使用ssl加密true + email.setSslSmtpPort("465"); //使用465端口 email.setCharset("UTF-8"); email.addTo(emailaddress);