From 56351fde73ff4f16828b6257ba57439f1ff89469 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Thu, 30 Nov 2017 10:27:45 +0100
Subject: [PATCH] Add AdminDebugEmailAdress config option.

---
 AutoTx/AutoTx.cs                           | 3 +++
 AutoTx/Resources/configuration-example.xml | 3 +++
 AutoTx/XmlWrapper/ServiceConfig.cs         | 1 +
 3 files changed, 7 insertions(+)

diff --git a/AutoTx/AutoTx.cs b/AutoTx/AutoTx.cs
index 7663811..63ce7c8 100644
--- a/AutoTx/AutoTx.cs
+++ b/AutoTx/AutoTx.cs
@@ -289,6 +289,9 @@ namespace AutoTx
                 writeLogDebug("SmtpHost: ====== Not configured, disabling notification emails! ======");
             } else {
                 writeLogDebug("SmtpHost: " + _config.SmtpHost);
+                writeLogDebug("EmailFrom: " + _config.EmailFrom);
+                writeLogDebug("AdminEmailAdress: " + _config.AdminEmailAdress);
+                writeLogDebug("AdminDebugEmailAdress: " + _config.AdminDebugEmailAdress);
             }
             writeLogDebug("");
 
diff --git a/AutoTx/Resources/configuration-example.xml b/AutoTx/Resources/configuration-example.xml
index 728571a..613981c 100644
--- a/AutoTx/Resources/configuration-example.xml
+++ b/AutoTx/Resources/configuration-example.xml
@@ -78,4 +78,7 @@
          admin notification before sending the next one -->
     <AdminNotificationDelta>60</AdminNotificationDelta>
     <AdminEmailAdress>admin@mydomain.xy</AdminEmailAdress>
+    <!-- AdminDebugEmailAdress: an email address where to send certain debug
+         messages to, e.g. on completed transfers. Can be empty. -->
+    <AdminDebugEmailAdress>admin@mydomain.xy</AdminDebugEmailAdress>
 </ServiceConfig>
\ No newline at end of file
diff --git a/AutoTx/XmlWrapper/ServiceConfig.cs b/AutoTx/XmlWrapper/ServiceConfig.cs
index d840a89..087f469 100644
--- a/AutoTx/XmlWrapper/ServiceConfig.cs
+++ b/AutoTx/XmlWrapper/ServiceConfig.cs
@@ -59,6 +59,7 @@ namespace AutoTx.XmlWrapper
         public string SmtpPasswortCredential { get; set; }
         public string EmailFrom { get; set; }
         public string AdminEmailAdress { get; set; }
+        public string AdminDebugEmailAdress { get; set; }
         public string EmailPrefix { get; set; }
 
         public int ServiceTimer { get; set; }
-- 
GitLab