|
|
|
@ -2,21 +2,6 @@ |
|
|
|
logging.config=classpath:logback-spring.xml |
|
|
|
logging.path=./logs/ |
|
|
|
|
|
|
|
#application.properties基本配置,后面我都使用此配置来发送邮件 |
|
|
|
## 基本配置 |
|
|
|
### smtp服务器主机(163的) |
|
|
|
spring.mail.host=smtp.163.com |
|
|
|
### 连接邮件服务器端口(默认SMTP 25 POP 110) |
|
|
|
spring.mail.port=25 |
|
|
|
### 服务协议SMTP(代表是发送邮件) |
|
|
|
spring.mail.protocol=smtp |
|
|
|
### 登录服务器邮箱账号 |
|
|
|
spring.mail.username=antladdie |
|
|
|
### 登录服务器邮箱授权码(不是邮箱密码,这个是我们开通SMTP、POP时得到的授权码) |
|
|
|
spring.mail.password=xxxxxxxxxxxxx |
|
|
|
### 默认邮件的编码集(MimeMessage 编码,默认UTF-8) |
|
|
|
spring.mail.default-encoding=UTF-8 |
|
|
|
|
|
|
|
# 补充配置(这里具体可以参照Jakarta Mail的扩展配置) |
|
|
|
## 默认发送方邮箱账号(当程序未指定发件人邮箱则默认取这个) |
|
|
|
#spring.mail.properties.mail.smtp.from=antladdie@163.com |
|
|
|
@ -29,4 +14,14 @@ spring.mail.properties.mail.smtp.connectiontimeout=60000 |
|
|
|
## 邮件发送时间的限制(毫秒) |
|
|
|
spring.mail.properties.mail.smtp.writetimeout=60000 |
|
|
|
## 日志打印,邮件发送过程的日志会被输出 |
|
|
|
spring.mail.properties.mail.debug=true |
|
|
|
spring.mail.properties.mail.debug=true |
|
|
|
|
|
|
|
# outlook 开启tls |
|
|
|
#spring.mail.username=xxxxxxx@outlook.com |
|
|
|
#spring.mail.password=xxxxxxxxx |
|
|
|
#spring.mail.port=587 |
|
|
|
#spring.mail.host=smtp-mail.outlook.com |
|
|
|
# 设置ssl认证 |
|
|
|
# spring.mail.properties.mail.smtp.ssl.enable=true |
|
|
|
# 设置TLS认证 |
|
|
|
spring.mail.properties.mail.smtp.starttls.required=true |
|
|
|
|