fix bug 63175

This commit is contained in:
pavelbannov 2023-06-29 18:48:39 +03:00
parent 597ce7078e
commit 654f59fb9d

View File

@ -64,14 +64,21 @@ public class SmtpSettingsController : ControllerBase
{
CheckSmtpPermissions();
var settings = _mapper.Map<SmtpSettings, SmtpSettingsDto>(_coreConfiguration.SmtpSettings);
var current = _coreConfiguration.SmtpSettings;
if (current.IsDefaultSettings && !_coreBaseSettings.Standalone)
{
current = SmtpSettings.Empty;
}
var settings = _mapper.Map<SmtpSettings, SmtpSettingsDto>(current);
settings.CredentialsUserPassword = "";
return settings;
}
[HttpPost("smtp")]
public SmtpSettingsDto SaveSmtpSettings( SmtpSettingsDto inDto)
public SmtpSettingsDto SaveSmtpSettings(SmtpSettingsDto inDto)
{
CheckSmtpPermissions();