Merge pull request 'feat(email): add mail protocol configuration option' (!214) from bugfix/prod-mails into main
All checks were successful
Release / Release (push) Successful in 58s
Release / Build Frontend Image (push) Successful in 25s
Release / Build Backend Image (push) Successful in 31s

Reviewed-on: #214
Reviewed-by: Jan K9f <jan@kjan.email>
This commit is contained in:
Constantin Simonis 2025-05-21 11:13:45 +00:00
commit c68b3f2f7e
No known key found for this signature in database
GPG key ID: 944223E4D46B7412
3 changed files with 5 additions and 0 deletions

View file

@ -28,6 +28,7 @@ public class EmailService {
this.mailConfig = mailConfig; this.mailConfig = mailConfig;
this.mailSender.setHost(mailConfig.host); this.mailSender.setHost(mailConfig.host);
this.mailSender.setPort(mailConfig.port); this.mailSender.setPort(mailConfig.port);
this.mailSender.setProtocol(mailConfig.protocol);
if (mailConfig.authenticationEnabled) { if (mailConfig.authenticationEnabled) {
this.mailSender.setUsername(mailConfig.username); this.mailSender.setUsername(mailConfig.username);
this.mailSender.setPassword(mailConfig.password); this.mailSender.setPassword(mailConfig.password);

View file

@ -22,4 +22,7 @@ public class MailConfig {
@Value("${app.mail.from-address}") @Value("${app.mail.from-address}")
public String fromAddress; public String fromAddress;
@Value("${app.mail.protocol}")
public String protocol;
} }

View file

@ -14,6 +14,7 @@ app.mail.port=${MAIL_PORT:1025}
app.mail.username=${MAIL_USER:null} app.mail.username=${MAIL_USER:null}
app.mail.password=${MAIL_PASS:null} app.mail.password=${MAIL_PASS:null}
app.mail.from-address=${MAIL_FROM:casino@localhost} app.mail.from-address=${MAIL_FROM:casino@localhost}
app.mail.protocol=${MAIL_PROTOCOL:smtp}
spring.application.name=casino spring.application.name=casino