feat(email): add mail protocol configuration option
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / eslint (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Checkstyle Main (pull_request) Successful in 1m1s
CI / Docker backend validation (pull_request) Successful in 1m15s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 8s
CI / eslint (pull_request) Has been skipped
CI / Docker frontend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Has been skipped
CI / prettier (pull_request) Has been skipped
CI / test-build (pull_request) Has been skipped
CI / Checkstyle Main (pull_request) Successful in 1m1s
CI / Docker backend validation (pull_request) Successful in 1m15s
This commit is contained in:
parent
8119db68c9
commit
dce5d1a86e
3 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,7 @@ public class EmailService {
|
|||
this.mailConfig = mailConfig;
|
||||
this.mailSender.setHost(mailConfig.host);
|
||||
this.mailSender.setPort(mailConfig.port);
|
||||
this.mailSender.setProtocol(mailConfig.protocol);
|
||||
if (mailConfig.authenticationEnabled) {
|
||||
this.mailSender.setUsername(mailConfig.username);
|
||||
this.mailSender.setPassword(mailConfig.password);
|
||||
|
|
|
@ -22,4 +22,7 @@ public class MailConfig {
|
|||
|
||||
@Value("${app.mail.from-address}")
|
||||
public String fromAddress;
|
||||
|
||||
@Value("${app.mail.protocol}")
|
||||
public String protocol;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ app.mail.port=${MAIL_PORT:1025}
|
|||
app.mail.username=${MAIL_USER:null}
|
||||
app.mail.password=${MAIL_PASS:null}
|
||||
app.mail.from-address=${MAIL_FROM:casino@localhost}
|
||||
app.mail.protocol=${MAIL_PROTOCOL:smtp}
|
||||
|
||||
spring.application.name=casino
|
||||
|
||||
|
|
Reference in a new issue