From 172fb10b56f3c68040589c06e56da2684f71b904 Mon Sep 17 00:00:00 2001 From: yuyang Date: Fri, 1 Apr 2022 17:04:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/XhpcInvoiceServiceImpl.java | 13 ------------- .../src/main/resources/config/mail.setting | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java index ff81f5a1..78205829 100644 --- a/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java +++ b/xhpc-modules/xhpc-invoice/src/main/java/com/xhpc/invoice/service/impl/XhpcInvoiceServiceImpl.java @@ -149,7 +149,6 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService { String receiveEmail = xhpcInvoice.getReceiveEmail(); //从阿里云上下载下来电子发票 String fileUrl = requestData.getEletricInvoiceUrl(); - System.out.println("<<<<<<<<<<111<<<<<<<<<发票路径>>>>>>>>>>222>>>>>>>>"+fileUrl); File electricInvoiceFile = new File(environment.getProperty("file.serverStoreDisposableFileLocation") + "ElectricInvoice.pdf"); try { //参数1 文件下载路径 @@ -159,20 +158,8 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService { } catch (Exception e) { throw new RuntimeException("在阿里云上无法找到该文件,请检查上传的图片路径是否完整或有误"); } - System.out.println("<<<<<<<<<<333<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl); 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); - System.out.println("<<<<<<<<<<4444<<<<<<<<<发票路径>>>>>>>>>>444>>>>>>>>"+fileUrl); } catch (Exception e) { System.out.println(e.getMessage()); return Boolean.FALSE; diff --git a/xhpc-modules/xhpc-invoice/src/main/resources/config/mail.setting b/xhpc-modules/xhpc-invoice/src/main/resources/config/mail.setting index c2fbe7fb..a42a8654 100644 --- a/xhpc-modules/xhpc-invoice/src/main/resources/config/mail.setting +++ b/xhpc-modules/xhpc-invoice/src/main/resources/config/mail.setting @@ -1,11 +1,11 @@ # 邮件服务器的SMTP地址,可选,默认为smtp.<发件人邮箱后缀> host = smtp.163.com # 邮件服务器的SMTP端口,可选,默认25 -port = 456 +port = 465 # 发件人(必须正确,否则发送失败) from = coml_aaron@163.com # 用户名,默认为发件人邮箱前缀 -user = 小华充电 +user = coml_aaron@163.com # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助) pass = DRTYHUCGNKPOFRVE # 使用SSL安全连接