|
@@ -2,6 +2,7 @@ package com.fdkankan.sms;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.sun.mail.util.MailSSLSocketFactory;
|
|
import com.sun.mail.util.MailSSLSocketFactory;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import javax.activation.DataHandler;
|
|
import javax.activation.DataHandler;
|
|
@@ -13,6 +14,7 @@ import java.io.UnsupportedEncodingException;
|
|
import java.security.GeneralSecurityException;
|
|
import java.security.GeneralSecurityException;
|
|
import java.util.Properties;
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
+@Slf4j
|
|
public class SendMailAcceUtils {
|
|
public class SendMailAcceUtils {
|
|
|
|
|
|
public final static String subject = "四维看看购物发票详情 ";
|
|
public final static String subject = "四维看看购物发票详情 ";
|
|
@@ -79,7 +81,7 @@ public class SendMailAcceUtils {
|
|
msg = msg.replaceAll("scene_link", "https://test.4dkankan.com/spg.html?m=KJ-sCqJv2aS").replaceAll("help_link", "https://test.4dkankan.com/spg.html?m=KJ-sCqJv2aS");
|
|
msg = msg.replaceAll("scene_link", "https://test.4dkankan.com/spg.html?m=KJ-sCqJv2aS").replaceAll("help_link", "https://test.4dkankan.com/spg.html?m=KJ-sCqJv2aS");
|
|
|
|
|
|
SendMailAcceUtils.sendMail("4Dkankan@4dage.com", "6996790AAaa",
|
|
SendMailAcceUtils.sendMail("4Dkankan@4dage.com", "6996790AAaa",
|
|
- "smtp.exmail.qq.com", "879865044@qq.com", "The Scene Calculation is Now Complete.", msg, null);
|
|
|
|
|
|
+ "smtp.exmail.qq.com", "767383594@qq.com", "看看吧", msg, null);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -169,13 +171,15 @@ public class SendMailAcceUtils {
|
|
message.setContent(multipart);
|
|
message.setContent(multipart);
|
|
|
|
|
|
// 发送消息
|
|
// 发送消息
|
|
|
|
+ log.info("执行发送邮件");
|
|
Transport.send(message);
|
|
Transport.send(message);
|
|
// System.out.println("Sent message successfully....");
|
|
// System.out.println("Sent message successfully....");
|
|
|
|
+ log.info("邮件发送成功");
|
|
return true;
|
|
return true;
|
|
} catch (MessagingException e) {
|
|
} catch (MessagingException e) {
|
|
- e.printStackTrace();
|
|
|
|
|
|
+ log.error("发送邮件失败",e);
|
|
} catch (UnsupportedEncodingException e) {
|
|
} catch (UnsupportedEncodingException e) {
|
|
- e.printStackTrace();
|
|
|
|
|
|
+ log.error("发送邮件失败",e);
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|