发送邮件更换端口

hehai
jiakun.lin 4 years ago
parent cf83a5cc0e
commit ab8ef68d51
  1. 2
      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);

Loading…
Cancel
Save