Skip to content

Commit

Permalink
Enable mail SSL and set port explicitely
Browse files Browse the repository at this point in the history
  • Loading branch information
dersmon committed Jul 11, 2024
1 parent 15bc7cb commit d749d70
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ public MailService(final @Value("${mailSMTPServer}") String smtpServer

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

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

0 comments on commit d749d70

Please sign in to comment.