Skip to content

Commit

Permalink
Fix default smtp host logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgaldi committed Aug 12, 2024
1 parent f7156e6 commit ad48694
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ModelConfigBuilder {
private String _assetsUrl;

// email setup
private String _smtpServer = "localhost";
private String _smtpServer;
private String _smtpUsername;
private String _smtpPassword;
private String _supportEmail;
Expand Down Expand Up @@ -97,6 +97,7 @@ public ModelConfig build() throws WdkModelException {
//assertNonNull("userDatasetStoreConfig", _userDatasetStoreConfig);
Optional<String> smtpUsername = Optional.ofNullable(_smtpUsername).filter(s -> !s.isBlank());
Optional<String> smtpPassword = Optional.ofNullable(_smtpPassword).filter(s -> !s.isBlank());
String smtpServer = _smtpServer == null ? "localhost" : _smtpServer;

return new ModelConfig(

Expand All @@ -120,7 +121,7 @@ public ModelConfig build() throws WdkModelException {
_assetsUrl,

// email setup
_smtpServer,
smtpServer,
smtpUsername,
smtpPassword,
_supportEmail,
Expand Down

0 comments on commit ad48694

Please sign in to comment.