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

Fix spelling of "address" in code and config

Fixes #72
parent 41d23dd7
No related branches found
No related tags found
No related merge requests found
......@@ -193,12 +193,12 @@ namespace ATxCommon.Serializables
/// <summary>
/// The mail recipient address for admin notifications (including "Fatal" log messages).
/// </summary>
public string AdminEmailAdress { get; set; }
public string AdminEmailAddress { get; set; }
/// <summary>
/// The mail recipient address for debug notifications (including "Error" log messages).
/// </summary>
public string AdminDebugEmailAdress { get; set; }
public string AdminDebugEmailAddress { get; set; }
/// <summary>
/// Send an email to the user upon completed transfers. Default: true.
......@@ -559,8 +559,8 @@ namespace ATxCommon.Serializables
$"SmtpPasswortCredential: --- not showing ---\n" +
$"EmailFrom: {EmailFrom}\n" +
$"EmailPrefix: {EmailPrefix}\n" +
$"AdminEmailAdress: {AdminEmailAdress}\n" +
$"AdminDebugEmailAdress: {AdminDebugEmailAdress}\n" +
$"AdminEmailAddress: {AdminEmailAddress}\n" +
$"AdminDebugEmailAddress: {AdminDebugEmailAddress}\n" +
$"SendTransferNotification: {SendTransferNotification}\n" +
$"SendAdminNotification: {SendAdminNotification}\n" +
$"AdminNotificationDelta: {AdminNotificationDelta} min (" +
......
......@@ -174,15 +174,15 @@ namespace ATxService
/// Configure logging to email targets.
///
/// Depending on the configuration, set up the logging via email. If no SmtpHost or no
/// AdminEmailAdress is configured, nothing will be done. If they're set in the config file,
/// AdminEmailAddress is configured, nothing will be done. If they're set in the config file,
/// a log target for messages with level "Fatal" will be configured. In addition, if the
/// AdminDebugEmailAdress is set, another target for "Error" level messages is configured
/// AdminDebugEmailAddress is set, another target for "Error" level messages is configured
/// using this address as recipient.
/// </summary>
private void SetupMailLogging() {
try {
if (string.IsNullOrWhiteSpace(_config.SmtpHost) ||
string.IsNullOrWhiteSpace(_config.AdminEmailAdress)) {
string.IsNullOrWhiteSpace(_config.AdminEmailAddress)) {
Log.Info("SMTP host or admin recipient unconfigured, disabling mail logging.");
return;
}
......@@ -202,7 +202,7 @@ namespace ATxService
SmtpServer = _config.SmtpHost,
SmtpPort = _config.SmtpPort,
From = _config.EmailFrom,
To = _config.AdminEmailAdress,
To = _config.AdminEmailAddress,
Subject = subject,
Body = body,
};
......@@ -215,13 +215,13 @@ namespace ATxService
logConfig.AddRuleForOneLevel(LogLevel.Fatal, mailTargetFatalLimited);
// "Error" target
if (!string.IsNullOrWhiteSpace(_config.AdminDebugEmailAdress)) {
if (!string.IsNullOrWhiteSpace(_config.AdminDebugEmailAddress)) {
var mailTargetError = new MailTarget {
Name = "mailerror",
SmtpServer = _config.SmtpHost,
SmtpPort = _config.SmtpPort,
From = _config.EmailFrom,
To = _config.AdminDebugEmailAdress,
To = _config.AdminDebugEmailAddress,
Subject = subject,
Body = body,
};
......
......@@ -74,7 +74,7 @@ namespace ATxService
}
/// <summary>
/// Send a notification email to the AdminEmailAdress.
/// Send a notification email to the AdminEmailAddress.
/// </summary>
/// <param name="body">The email text.</param>
/// <param name="subject">Optional subject for the email.</param>
......@@ -96,9 +96,9 @@ namespace ATxService
body = $"Notification from: {_config.HostAlias} ({Environment.MachineName})\n\n{body}";
Log.Debug("Sending an admin notification email.");
SendEmail(_config.AdminEmailAdress, subject, body);
SendEmail(_config.AdminEmailAddress, subject, body);
_status.LastAdminNotification = DateTime.Now;
Log.Debug("{0} sent to AdminEmailAdress.", subject);
Log.Debug("{0} sent to AdminEmailAddress.", subject);
return true;
}
......@@ -139,7 +139,7 @@ namespace ATxService
// explicitly use SendEmail() instead of SendAdminEmail() here to circumvent the
// additional checks done in the latter one and make sure the low space email is
// sent out independently of that:
SendEmail(_config.AdminEmailAdress, "low disk space", body);
SendEmail(_config.AdminEmailAddress, "low disk space", body);
}
catch (Exception ex) {
Log.Error("Error loading email template: {0}", ex.Message);
......
......@@ -92,13 +92,13 @@
<!-- EmailPrefix: prefix label for email subjects -->
<EmailPrefix>[Core Facility] </EmailPrefix>
<!-- AdminEmailAdress: an email address for admin notifications (including
<!-- AdminEmailAddress: an email address for admin notifications (including
"Fatal" log messages) -->
<AdminEmailAdress>admin@mydomain.xy</AdminEmailAdress>
<AdminEmailAddress>admin@mydomain.xy</AdminEmailAddress>
<!-- AdminDebugEmailAdress: an email address where to send certain debug
<!-- AdminDebugEmailAddress: an email address where to send certain debug
messages to, e.g. on completed transfers -->
<AdminDebugEmailAdress>admin@mydomain.xy</AdminDebugEmailAdress>
<AdminDebugEmailAddress>admin@mydomain.xy</AdminDebugEmailAddress>
<!-- SendTransferNotification: send email to user on finished transfers -->
<SendTransferNotification>true</SendTransferNotification>
......
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