From 49184b287b4845da7626dda0dc9bc989b02aae8e Mon Sep 17 00:00:00 2001 From: "DESKTOP-T0O5CDB\\DESK-555BD" Date: Thu, 25 Apr 2024 12:45:21 -0600 Subject: [PATCH] null check for mail config --- Helper/MailHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }