From 358ed232257e1fbf67e2ea9a12ab0efc9f83d6c2 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 18 Jan 2024 11:52:58 +0800
Subject: [PATCH] 邮件配置

---
 src/main/resources/application.yml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 6c51b18..ec3a25a 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -48,6 +48,26 @@
         session-stat-max-count: 10
   main:
     allow-circular-references: true
+  #邮件配置
+  mail:
+    # 配置 SMTP 服务器地址
+    host: smtp.qq.com
+    # 发送者邮箱
+    username: 503*****@qq.com
+    # 配置密码,注意不是真正的密码,而是刚刚申请到的授权码
+    password: apbpxb****bwtbiha
+    # 端口号465或587
+    port: 587
+    # 默认的邮件编码为UTF-8
+    default-encoding: UTF-8
+    # 配置SSL 加密工厂
+    properties:
+      mail:
+        smtp:
+          socketFactoryClass: javax.net.ssl.SSLSocketFactory
+        #表示开启 DEBUG 模式,这样,邮件发送过程的日志会在控制台打印出来,方便排查错误
+        debug: true
+    protocol: smtps
 
 #  jackson:
 #    date-format: yyyy-MM-dd HH:mm:ss

--
Gitblit v1.9.3