diff --git a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/ServerSettingsSmtpHostController.cs b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/ServerSettingsSmtpHostController.cs
index 9250f050acd..c8b1e39e7ad 100644
--- a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/ServerSettingsSmtpHostController.cs
+++ b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/ServerSettingsSmtpHostController.cs
@@ -47,7 +47,7 @@ public HttpResponseMessage GetSmtpSettings()
smtpAuthentication = HostController.Instance.GetString("SMTPAuthentication"),
enableSmtpSsl = HostController.Instance.GetBoolean("SMTPEnableSSL", false),
smtpUserName = HostController.Instance.GetString("SMTPUsername"),
- smtpPassword = GetSmtpPassword(),
+ smtpPassword = string.Empty,
smtpHostEmail = HostController.Instance.GetString("HostEmail"),
messageSchedulerBatchSize = Host.MessageSchedulerBatchSize,
},
@@ -80,7 +80,12 @@ public HttpResponseMessage UpdateSmtpSettings(UpdateSmtpSettingsRequest request)
try
{
var portalId = PortalSettings.Current.PortalId;
- PortalController.UpdatePortalSetting(portalId, "SMTPmode", request.SmtpServerMode, false);
+ PortalController.UpdatePortalSetting(portalId, "SMTPmode", request.SmtpServerMode, false);
+
+ if (string.IsNullOrWhiteSpace(request.SmtpPassword))
+ {
+ request.SmtpPassword = GetSmtpPassword();
+ }
if (request.SmtpServerMode == "h")
{
diff --git a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Servers/App_LocalResources/Servers.resx b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Servers/App_LocalResources/Servers.resx
index f6f31a3f705..1199957818a 100644
--- a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Servers/App_LocalResources/Servers.resx
+++ b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.Servers/App_LocalResources/Servers.resx
@@ -418,7 +418,7 @@
SMTP Server Mode:
- Enter the password for the SMTP server.
+ Enter the password for the SMTP server. Leave blank to not to change it.
SMTP Password: