diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index f449915b3ae5a6fce1837e4c3efb402937f75d55..d588e497faa824cd837353d32cdc409254b11e90 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -174,8 +174,10 @@ namespace ATxService private void SetupMailLogging() { try { if (string.IsNullOrWhiteSpace(_config.SmtpHost) || - string.IsNullOrWhiteSpace(_config.AdminEmailAdress)) + string.IsNullOrWhiteSpace(_config.AdminEmailAdress)) { + Log.Info("SMTP host or admin recipient unconfigured, disabling mail logging."); return; + } var subject = $"{ServiceName} - {Environment.MachineName} - Admin Notification"; var body = $"Notification from '{_config.HostAlias}' [{Environment.MachineName}] (via NLog)\n\n" +