@@ -93,6 +93,8 @@ public ConfigKey<?>[] getConfigKeys() {
9393 UserPasswordResetSMTPHost ,
9494 UserPasswordResetSMTPPort ,
9595 UserPasswordResetSMTPUseAuth ,
96+ UserPasswordResetSMTPUseStartTLS ,
97+ UserPasswordResetSMTPEnabledSecurityProtocols ,
9698 UserPasswordResetSMTPUsername ,
9799 UserPasswordResetSMTPPassword ,
98100 PasswordResetMailTemplate
@@ -106,6 +108,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
106108 Boolean useAuth = UserPasswordResetSMTPUseAuth .value ();
107109 String username = UserPasswordResetSMTPUsername .value ();
108110 String password = UserPasswordResetSMTPPassword .value ();
111+ Boolean useStartTLS = UserPasswordResetSMTPUseStartTLS .value ();
112+ String enabledSecurityProtocols = UserPasswordResetSMTPEnabledSecurityProtocols .value ();
109113
110114 if (!StringUtils .isEmpty (smtpHost ) && smtpPort != null && smtpPort > 0 ) {
111115 String namespace = "password.reset.smtp" ;
@@ -117,6 +121,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
117121 configs .put (getKey (namespace , SMTPMailSender .CONFIG_USE_AUTH ), useAuth .toString ());
118122 configs .put (getKey (namespace , SMTPMailSender .CONFIG_USERNAME ), username );
119123 configs .put (getKey (namespace , SMTPMailSender .CONFIG_PASSWORD ), password );
124+ configs .put (getKey (namespace , SMTPMailSender .CONFIG_USE_STARTTLS ), useStartTLS .toString ());
125+ configs .put (getKey (namespace , SMTPMailSender .CONFIG_ENABLED_SECURITY_PROTOCOLS ), enabledSecurityProtocols );
120126
121127 mailSender = new SMTPMailSender (configs , namespace );
122128 }
0 commit comments