修改邮件配置
This commit is contained in:
parent
e3d281f3d6
commit
172fb10b56
@ -149,7 +149,6 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
|||||||
String receiveEmail = xhpcInvoice.getReceiveEmail();
|
String receiveEmail = xhpcInvoice.getReceiveEmail();
|
||||||
//从阿里云上下载下来电子发票
|
//从阿里云上下载下来电子发票
|
||||||
String fileUrl = requestData.getEletricInvoiceUrl();
|
String fileUrl = requestData.getEletricInvoiceUrl();
|
||||||
System.out.println("<<<<<<<<<<111<<<<<<<<<发票路径>>>>>>>>>>222>>>>>>>>"+fileUrl);
|
|
||||||
File electricInvoiceFile = new File(environment.getProperty("file.serverStoreDisposableFileLocation") + "ElectricInvoice.pdf");
|
File electricInvoiceFile = new File(environment.getProperty("file.serverStoreDisposableFileLocation") + "ElectricInvoice.pdf");
|
||||||
try {
|
try {
|
||||||
//参数1 文件下载路径
|
//参数1 文件下载路径
|
||||||
@ -159,20 +158,8 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException("在阿里云上无法找到该文件,请检查上传的图片路径是否完整或有误");
|
throw new RuntimeException("在阿里云上无法找到该文件,请检查上传的图片路径是否完整或有误");
|
||||||
}
|
}
|
||||||
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);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# 邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
|
# 邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀>
|
||||||
host = smtp.163.com
|
host = smtp.163.com
|
||||||
# 邮件服务器的SMTP端口,可选,默认25
|
# 邮件服务器的SMTP端口,可选,默认25
|
||||||
port = 456
|
port = 465
|
||||||
# 发件人(必须正确,否则发送失败)
|
# 发件人(必须正确,否则发送失败)
|
||||||
from = coml_aaron@163.com
|
from = coml_aaron@163.com
|
||||||
# 用户名,默认为发件人邮箱前缀
|
# 用户名,默认为发件人邮箱前缀
|
||||||
user = 小华充电
|
user = coml_aaron@163.com
|
||||||
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||||
pass = DRTYHUCGNKPOFRVE
|
pass = DRTYHUCGNKPOFRVE
|
||||||
# 使用SSL安全连接
|
# 使用SSL安全连接
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user