Skip to content
Snippets Groups Projects
Commit eb306c64 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Log a message if mail logging is disabled

parent 3dd83012
No related branches found
No related tags found
No related merge requests found
......@@ -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" +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment