修改邮件配置
This commit is contained in:
parent
b45007ba2e
commit
e3d281f3d6
@ -1,5 +1,7 @@
|
|||||||
package com.xhpc.invoice.service.impl;
|
package com.xhpc.invoice.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.extra.mail.MailAccount;
|
||||||
import cn.hutool.extra.mail.MailUtil;
|
import cn.hutool.extra.mail.MailUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
import cn.hutool.poi.excel.ExcelUtil;
|
import cn.hutool.poi.excel.ExcelUtil;
|
||||||
@ -159,6 +161,16 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
|||||||
}
|
}
|
||||||
System.out.println("<<<<<<<<<<333<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl);
|
System.out.println("<<<<<<<<<<333<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl);
|
||||||
try {
|
try {
|
||||||
|
// MailAccount account = new MailAccount();
|
||||||
|
// //account.setHost("www.scxhua.cn");
|
||||||
|
// account.setPort(456);
|
||||||
|
// account.setAuth(true);
|
||||||
|
// account.setFrom("coml_aaron@163.com");
|
||||||
|
// account.setUser("小华充电");
|
||||||
|
// account.setPass("DRTYHUCGNKPOFRVE");
|
||||||
|
// account.setSslEnable(true);
|
||||||
|
// MailUtil.send(account, receiveEmail, "【小华充电】电子发票", "邮件来自小华充电", false,electricInvoiceFile);
|
||||||
|
|
||||||
MailUtil.send(receiveEmail, "【小华充电】电子发票", "邮件来自小华充电", false, electricInvoiceFile);
|
MailUtil.send(receiveEmail, "【小华充电】电子发票", "邮件来自小华充电", false, electricInvoiceFile);
|
||||||
System.out.println("<<<<<<<<<<4444<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl);
|
System.out.println("<<<<<<<<<<4444<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -1,5 +1,14 @@
|
|||||||
|
# 邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
|
||||||
|
host = smtp.163.com
|
||||||
|
# 邮件服务器的SMTP端口,可选,默认25
|
||||||
|
port = 456
|
||||||
# 发件人(必须正确,否则发送失败)
|
# 发件人(必须正确,否则发送失败)
|
||||||
from = coml_aaron@163.com
|
from = coml_aaron@163.com
|
||||||
|
# 用户名,默认为发件人邮箱前缀
|
||||||
|
user = 小华充电
|
||||||
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||||
pass = DRTYHUCGNKPOFRVE
|
pass = DRTYHUCGNKPOFRVE
|
||||||
port = 456
|
# 使用SSL安全连接
|
||||||
|
sslEnable = true
|
||||||
|
protocol = smtps
|
||||||
|
default-encoding = UTF-8
|
||||||
Loading…
x
Reference in New Issue
Block a user