Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
member-api
Commits
5bf5de55
Commit
5bf5de55
authored
Nov 14, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化邮件发送
parent
57062a76
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
EmailServiceImpl.java
.../egolm/film/api/common/service/impl/EmailServiceImpl.java
+2
-1
MemberOpenApiController.java
...va/com/egolm/film/api/member/MemberOpenApiController.java
+2
-1
application.properties
src/main/resources/application.properties
+1
-0
No files found.
src/main/java/com/egolm/film/api/common/service/impl/EmailServiceImpl.java
View file @
5bf5de55
...
@@ -13,13 +13,14 @@ public class EmailServiceImpl implements EmailService {
...
@@ -13,13 +13,14 @@ public class EmailServiceImpl implements EmailService {
@Value
(
"${com.egolm.film.email.smtp.port}"
)
private
Integer
port
;
@Value
(
"${com.egolm.film.email.smtp.port}"
)
private
Integer
port
;
@Value
(
"${com.egolm.film.email.smtp.is_auth}"
)
private
Boolean
is_auth
;
@Value
(
"${com.egolm.film.email.smtp.is_auth}"
)
private
Boolean
is_auth
;
@Value
(
"${com.egolm.film.email.smtp.from}"
)
private
String
from
;
@Value
(
"${com.egolm.film.email.smtp.from}"
)
private
String
from
;
@Value
(
"${com.egolm.film.email.smtp.username}"
)
private
String
username
;
@Value
(
"${com.egolm.film.email.smtp.password}"
)
private
String
password
;
@Value
(
"${com.egolm.film.email.smtp.password}"
)
private
String
password
;
@Override
@Override
public
void
send
(
String
subject
,
String
content
,
String
...
emailAddress
)
{
public
void
send
(
String
subject
,
String
content
,
String
...
emailAddress
)
{
new
Thread
()
{
new
Thread
()
{
public
void
run
()
{
public
void
run
()
{
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
from
,
password
,
subject
,
content
,
null
,
emailAddress
);
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
username
,
password
,
from
,
subject
,
content
,
null
,
emailAddress
);
}
}
}.
start
();
}.
start
();
}
}
...
...
src/main/java/com/egolm/film/api/member/MemberOpenApiController.java
View file @
5bf5de55
...
@@ -111,10 +111,11 @@ public class MemberOpenApiController {
...
@@ -111,10 +111,11 @@ public class MemberOpenApiController {
Boolean
is_auth
=
true
;
Boolean
is_auth
=
true
;
String
content
=
"测试邮件"
;
String
content
=
"测试邮件"
;
String
from
=
"qu.xinliang@egolm.com"
;
String
from
=
"qu.xinliang@egolm.com"
;
String
username
=
"qu.xinliang"
;
String
password
=
"Liang12345"
;
String
password
=
"Liang12345"
;
String
to
=
"747539993@qq.com"
;
String
to
=
"747539993@qq.com"
;
String
subject
=
"测试邮件"
;
String
subject
=
"测试邮件"
;
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
from
,
password
,
subject
,
content
,
null
,
to
);
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
username
,
password
,
from
,
subject
,
content
,
null
,
to
);
}
}
@ResponseBody
@ResponseBody
...
...
src/main/resources/application.properties
View file @
5bf5de55
...
@@ -17,4 +17,5 @@ com.egolm.film.email.smtp.host=mail.egolm.com
...
@@ -17,4 +17,5 @@ com.egolm.film.email.smtp.host=mail.egolm.com
com.egolm.film.email.smtp.port
=
25
com.egolm.film.email.smtp.port
=
25
com.egolm.film.email.smtp.is_auth
=
true
com.egolm.film.email.smtp.is_auth
=
true
com.egolm.film.email.smtp.from
=
qu.xinliang@egolm.com
com.egolm.film.email.smtp.from
=
qu.xinliang@egolm.com
com.egolm.film.email.smtp.username
=
qu.xinliang
com.egolm.film.email.smtp.password
=
Liang12345
com.egolm.film.email.smtp.password
=
Liang12345
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