diff --git a/Helper/MailHelper.cs b/Helper/MailHelper.cs index 7bd63263..da82317c 100644 --- a/Helper/MailHelper.cs +++ b/Helper/MailHelper.cs @@ -22,7 +22,7 @@ public MailHelper( ILogger logger ) { //load mailConfig from Configuration - mailConfig = config.GetSection("MailConfig").Get(); + mailConfig = config.GetSection("MailConfig").Get() ?? new MailConfig(); _fileHelper = fileHelper; _logger = logger; }