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

Explain why email is not being sent but printed to the log instead

parent 34479296
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,8 @@ namespace ATxService
subject = $"{_config.EmailPrefix}{ServiceName} - {subject} - {_config.HostAlias}";
body += $"\n\n--\n[{_versionSummary}]\n";
if (string.IsNullOrEmpty(_config.SmtpHost)) {
Log.Debug("SendEmail: {0}\n{1}", subject, body);
Log.Debug("SendEmail: config option <SmtpHost> is unset, not sending mail - " +
"content shown below.\n[Subject] {0}\n[Body] {1}", subject, body);
return;
}
if (!recipient.Contains(@"@")) {
......
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