@@ -92,6 +92,8 @@ public ConfigKey<?>[] getConfigKeys() {
9292 UserPasswordResetSMTPHost ,
9393 UserPasswordResetSMTPPort ,
9494 UserPasswordResetSMTPUseAuth ,
95+ UserPasswordResetSMTPUseStartTLS ,
96+ UserPasswordResetSMTPEnabledSecurityProtocols ,
9597 UserPasswordResetSMTPUsername ,
9698 UserPasswordResetSMTPPassword ,
9799 UserPasswordResetDomainURL ,
@@ -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