Commit 3edae35b by 邓实川 Committed by chenzg

参数名修改

parent a3e5e76b
...@@ -53,7 +53,7 @@ public class EmailController { ...@@ -53,7 +53,7 @@ public class EmailController {
private final Logger logger = LoggerFactory.getLogger(this.getClass()); private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Value("${spring.mail.username}") @Value("${spring.mail.username}")
private String from; private String username;
@Autowired @Autowired
JavaMailSender mailSender; JavaMailSender mailSender;
...@@ -65,7 +65,7 @@ public class EmailController { ...@@ -65,7 +65,7 @@ public class EmailController {
message.setTo(to); message.setTo(to);
message.setSubject(subject); message.setSubject(subject);
message.setText(content); message.setText(content);
message.setFrom(from); message.setFrom(username);
mailSender.send(message); mailSender.send(message);
return ResultUtil.success(); return ResultUtil.success();
} }
...@@ -76,7 +76,7 @@ public class EmailController { ...@@ -76,7 +76,7 @@ public class EmailController {
MimeMessage message = mailSender.createMimeMessage(); MimeMessage message = mailSender.createMimeMessage();
try { try {
MimeMessageHelper helper = new MimeMessageHelper(message, true); MimeMessageHelper helper = new MimeMessageHelper(message, true);
helper.setFrom(from); helper.setFrom(username);
helper.setTo(to); helper.setTo(to);
helper.setSubject(subject); helper.setSubject(subject);
helper.setText(content, true); helper.setText(content, true);
...@@ -93,7 +93,7 @@ public class EmailController { ...@@ -93,7 +93,7 @@ public class EmailController {
MimeMessage message = mailSender.createMimeMessage(); MimeMessage message = mailSender.createMimeMessage();
try { try {
MimeMessageHelper helper = new MimeMessageHelper(message, true); MimeMessageHelper helper = new MimeMessageHelper(message, true);
helper.setFrom(from); helper.setFrom(username);
helper.setTo(to); helper.setTo(to);
helper.setSubject(subject); helper.setSubject(subject);
helper.setText(content, true); helper.setText(content, true);
...@@ -114,7 +114,7 @@ public class EmailController { ...@@ -114,7 +114,7 @@ public class EmailController {
MimeMessage message = mailSender.createMimeMessage(); MimeMessage message = mailSender.createMimeMessage();
try { try {
MimeMessageHelper helper = new MimeMessageHelper(message, true); MimeMessageHelper helper = new MimeMessageHelper(message, true);
helper.setFrom(from); helper.setFrom(username);
helper.setTo(to); helper.setTo(to);
helper.setSubject(subject); helper.setSubject(subject);
helper.setText(content, true); helper.setText(content, true);
......
...@@ -85,6 +85,11 @@ spring: ...@@ -85,6 +85,11 @@ spring:
height: 76 # Height of the banner image in chars (default based on image height). height: 76 # Height of the banner image in chars (default based on image height).
margin: 2 # Left hand image margin in chars. margin: 2 # Left hand image margin in chars.
invert: false # Whether images should be inverted for dark terminal themes. invert: false # Whether images should be inverted for dark terminal themes.
mail:
host: smtp.qq.com
username:
password:
default-encoding: utf-8
# mybatis-plus # mybatis-plus
mybatis-plus: mybatis-plus:
......
...@@ -85,6 +85,11 @@ spring: ...@@ -85,6 +85,11 @@ spring:
height: 76 # Height of the banner image in chars (default based on image height). height: 76 # Height of the banner image in chars (default based on image height).
margin: 2 # Left hand image margin in chars. margin: 2 # Left hand image margin in chars.
invert: false # Whether images should be inverted for dark terminal themes. invert: false # Whether images should be inverted for dark terminal themes.
mail:
host: smtp.qq.com
username:
password:
default-encoding: utf-8
# mybatis-plus # mybatis-plus
mybatis-plus: mybatis-plus:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment