Skip to content

Commit

Permalink
Construct properties in class
Browse files Browse the repository at this point in the history
  • Loading branch information
dersmon committed Jul 11, 2024
1 parent fbd7232 commit d864066
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ public MailService(final @Value("${mailSMTPServer}") String smtpServer
String smtpUserName = System.getenv("SMTP_USER_NAME");
String smtpUserPassword = System.getenv("SMTP_USER_PASSWORD");

Properties pros = new Properties();
pros.put("mail.smtp.auth", true);

mailSender.setHost(smtpServer);
mailSender.setUsername(smtpUserName);
mailSender.setPassword(smtpUserPassword);
mailSender.setJavaMailProperties(pros);
this.sender = sender;
}

Expand Down
4 changes: 1 addition & 3 deletions backend/src/main/resources/config/application.properties.dev
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,4 @@ booksPath=/tmp
dataExportMaxThreads=4
dataExportMaxTaskLifeTime=30000
dataExportPath=/tmp
dataExportMaxItemsPerExport=1000000

spring.mail.properties.mail.smtp.auth=true
dataExportMaxItemsPerExport=1000000

0 comments on commit d864066

Please sign in to comment.