@@ -93,6 +93,8 @@ public ConfigKey<?>[] getConfigKeys() {
93
93
UserPasswordResetSMTPHost ,
94
94
UserPasswordResetSMTPPort ,
95
95
UserPasswordResetSMTPUseAuth ,
96
+ UserPasswordResetSMTPUseStartTLS ,
97
+ UserPasswordResetSMTPEnabledSecurityProtocols ,
96
98
UserPasswordResetSMTPUsername ,
97
99
UserPasswordResetSMTPPassword ,
98
100
PasswordResetMailTemplate
@@ -106,6 +108,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
106
108
Boolean useAuth = UserPasswordResetSMTPUseAuth .value ();
107
109
String username = UserPasswordResetSMTPUsername .value ();
108
110
String password = UserPasswordResetSMTPPassword .value ();
111
+ Boolean useStartTLS = UserPasswordResetSMTPUseStartTLS .value ();
112
+ String enabledSecurityProtocols = UserPasswordResetSMTPEnabledSecurityProtocols .value ();
109
113
110
114
if (!StringUtils .isEmpty (smtpHost ) && smtpPort != null && smtpPort > 0 ) {
111
115
String namespace = "password.reset.smtp" ;
@@ -117,6 +121,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
117
121
configs .put (getKey (namespace , SMTPMailSender .CONFIG_USE_AUTH ), useAuth .toString ());
118
122
configs .put (getKey (namespace , SMTPMailSender .CONFIG_USERNAME ), username );
119
123
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 );
120
126
121
127
mailSender = new SMTPMailSender (configs , namespace );
122
128
}
0 commit comments