Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
3edae35b
Commit
3edae35b
authored
May 25, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数名修改
parent
a3e5e76b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
src/main/java/cn/timer/api/controller/email/EmailController.java
+5
-5
src/main/resources/application-pro.yml
+5
-0
src/main/resources/application-test.yml
+5
-0
No files found.
src/main/java/cn/timer/api/controller/email/EmailController.java
View file @
3edae35b
...
...
@@ -53,7 +53,7 @@ public class EmailController {
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
@Value
(
"${spring.mail.username}"
)
private
String
from
;
private
String
username
;
@Autowired
JavaMailSender
mailSender
;
...
...
@@ -65,7 +65,7 @@ public class EmailController {
message
.
setTo
(
to
);
message
.
setSubject
(
subject
);
message
.
setText
(
content
);
message
.
setFrom
(
from
);
message
.
setFrom
(
username
);
mailSender
.
send
(
message
);
return
ResultUtil
.
success
();
}
...
...
@@ -76,7 +76,7 @@ public class EmailController {
MimeMessage
message
=
mailSender
.
createMimeMessage
();
try
{
MimeMessageHelper
helper
=
new
MimeMessageHelper
(
message
,
true
);
helper
.
setFrom
(
from
);
helper
.
setFrom
(
username
);
helper
.
setTo
(
to
);
helper
.
setSubject
(
subject
);
helper
.
setText
(
content
,
true
);
...
...
@@ -93,7 +93,7 @@ public class EmailController {
MimeMessage
message
=
mailSender
.
createMimeMessage
();
try
{
MimeMessageHelper
helper
=
new
MimeMessageHelper
(
message
,
true
);
helper
.
setFrom
(
from
);
helper
.
setFrom
(
username
);
helper
.
setTo
(
to
);
helper
.
setSubject
(
subject
);
helper
.
setText
(
content
,
true
);
...
...
@@ -114,7 +114,7 @@ public class EmailController {
MimeMessage
message
=
mailSender
.
createMimeMessage
();
try
{
MimeMessageHelper
helper
=
new
MimeMessageHelper
(
message
,
true
);
helper
.
setFrom
(
from
);
helper
.
setFrom
(
username
);
helper
.
setTo
(
to
);
helper
.
setSubject
(
subject
);
helper
.
setText
(
content
,
true
);
...
...
src/main/resources/application-pro.yml
View file @
3edae35b
...
...
@@ -85,6 +85,11 @@ spring:
height
:
76
# Height of the banner image in chars (default based on image height).
margin
:
2
# Left hand image margin in chars.
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
:
...
...
src/main/resources/application-test.yml
View file @
3edae35b
...
...
@@ -85,6 +85,11 @@ spring:
height
:
76
# Height of the banner image in chars (default based on image height).
margin
:
2
# Left hand image margin in chars.
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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment