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
9043ddf2
Commit
9043ddf2
authored
Oct 10, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改邮件发送
parent
f2578808
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
2 deletions
+30
-2
pom.xml
pom.xml
+8
-0
MemberOpenApiController.java
...main/java/com/egolm/film/api/MemberOpenApiController.java
+20
-0
EmailServiceImpl.java
...ain/java/com/egolm/film/common/impl/EmailServiceImpl.java
+1
-1
application.properties
src/main/resources/application.properties
+1
-1
No files found.
pom.xml
View file @
9043ddf2
...
@@ -63,6 +63,14 @@
...
@@ -63,6 +63,14 @@
<artifactId>
activation
</artifactId>
<artifactId>
activation
</artifactId>
<version>
1.1
</version>
<version>
1.1
</version>
</dependency>
</dependency>
<dependency>
<groupId>
javax.mail
</groupId>
<artifactId>
javax.mail-api
</artifactId>
</dependency>
<dependency>
<groupId>
com.sun.mail
</groupId>
<artifactId>
javax.mail
</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
src/main/java/com/egolm/film/api/MemberOpenApiController.java
View file @
9043ddf2
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.MailUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.web.ServletUtil
;
import
com.egolm.common.web.ServletUtil
;
import
com.egolm.film.api.member.service.MemberService
;
import
com.egolm.film.api.member.service.MemberService
;
...
@@ -81,6 +82,25 @@ public class MemberOpenApiController {
...
@@ -81,6 +82,25 @@ public class MemberOpenApiController {
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
}
public
static
void
main
(
String
[]
args
)
{
/**
* com.egolm.film.email.smtp.host=mail.egolm.com
com.egolm.film.email.smtp.port=25
com.egolm.film.email.smtp.is_auth=true
com.egolm.film.email.smtp.from=qu.xinliang@egolm.com
com.egolm.film.email.smtp.password=Liang12345
*/
String
host
=
"mail.egolm.com"
;
Integer
port
=
25
;
Boolean
is_auth
=
true
;
String
content
=
"测试邮件"
;
String
from
=
"qu.xinliang@egolm.com"
;
String
password
=
"Liang12345"
;
String
to
=
"747539993@qq.com"
;
String
subject
=
"测试邮件"
;
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
from
,
password
,
subject
,
content
,
null
,
to
);
}
@ResponseBody
@ResponseBody
@PostMapping
(
"setLocale"
)
@PostMapping
(
"setLocale"
)
@ApiOperation
(
"设置语言环境"
)
@ApiOperation
(
"设置语言环境"
)
...
...
src/main/java/com/egolm/film/common/impl/EmailServiceImpl.java
View file @
9043ddf2
...
@@ -17,7 +17,7 @@ public class EmailServiceImpl implements EmailService {
...
@@ -17,7 +17,7 @@ public class EmailServiceImpl implements EmailService {
@Override
@Override
public
void
send
(
String
subject
,
String
content
,
String
...
emailAddress
)
{
public
void
send
(
String
subject
,
String
content
,
String
...
emailAddress
)
{
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
content
,
password
,
subject
,
content
,
null
,
emailAddress
);
MailUtil
.
sendBySmtp
(
host
,
port
,
is_auth
,
from
,
password
,
subject
,
content
,
null
,
emailAddress
);
}
}
}
}
src/main/resources/application.properties
View file @
9043ddf2
...
@@ -17,7 +17,7 @@ spring.messages.basename=classpath:i18n/messages
...
@@ -17,7 +17,7 @@ spring.messages.basename=classpath:i18n/messages
spring.messages.cache-seconds
=
3600
spring.messages.cache-seconds
=
3600
spring.messages.encoding
=
UTF-8
spring.messages.encoding
=
UTF-8
com.egolm.film.email.smtp.host
=
smtp.163
.com
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
=
15601712556@163.com
com.egolm.film.email.smtp.from
=
15601712556@163.com
...
...
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