From ab8ef68d516b8595598b7401ff8a6471c3b06d3b Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Wed, 24 Mar 2021 17:16:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/msdw/tms/config/EmailUtils.java | 2 ++ 1 file changed, 2 insertions(+) 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);