Skip to content

Commit

Permalink
Bit more defensive as these values may not be in the config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
poppastring committed Jun 28, 2022
1 parent be88371 commit 6a19238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/DasBlog.Web.Repositories/BlogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ private string GetFromEmail()
{
if (string.IsNullOrWhiteSpace(dasBlogSettings.SiteConfiguration.SmtpFromEmail))
{
return dasBlogSettings.SiteConfiguration.SmtpUserName;
return dasBlogSettings.SiteConfiguration.SmtpUserName?.Trim();
}

return dasBlogSettings.SiteConfiguration.SmtpFromEmail.Trim();
return dasBlogSettings.SiteConfiguration.SmtpFromEmail?.Trim();
}
public bool SendTestEmail()
{
Expand Down

0 comments on commit 6a19238

Please sign in to comment.