springboot pom.xml文件
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
application.yml
spring:
mail:
default-encoding: UTF-8
host: smtp.163.com
protocol: smtp
username: 89444444@163.com
password:
smtp:
auth: true
starttls:
enable: true
required: true