From 4c640b5a6c3be9084ff273003337ae7bf46eaf61 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Tue, 11 Aug 2020 17:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/utils/email/SimpleMailSenderUtil.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cloud-common/src/main/java/com/cm/common/utils/email/SimpleMailSenderUtil.java b/cloud-common/src/main/java/com/cm/common/utils/email/SimpleMailSenderUtil.java index 1603ef1..8d3454b 100644 --- a/cloud-common/src/main/java/com/cm/common/utils/email/SimpleMailSenderUtil.java +++ b/cloud-common/src/main/java/com/cm/common/utils/email/SimpleMailSenderUtil.java @@ -120,12 +120,17 @@ public class SimpleMailSenderUtil { public static void main(String[] args) throws Exception { //这个类主要是设置邮件 MailSenderInfo mailInfo = new MailSenderInfo(); - mailInfo.setMailServerHost("smtp.163.com"); - mailInfo.setMailServerPort(25); +// mailInfo.setMailServerHost("smtp.163.com"); +// mailInfo.setMailServerPort(25); +// mailInfo.setUserName("dpdbd001@163.com"); +// mailInfo.setPassword("WAASUQNNVITVXDJS"); + + mailInfo.setMailServerHost("smtp.qq.com"); + mailInfo.setMailServerPort(587); mailInfo.setValidate(true); - mailInfo.setUserName("dpdbd001@163.com"); - mailInfo.setPassword("WAASUQNNVITVXDJS"); - mailInfo.setFromAddress("dpdbd001@163.com"); + mailInfo.setUserName("450292408@qq.com"); + mailInfo.setPassword("bvtzzosemkuubiij"); + mailInfo.setFromAddress("450292408@qq.com"); mailInfo.setToAddress("450292408@qq.com"); mailInfo.setSubject("123"); mailInfo.setContent("123");