diff --git a/Shared/Core/MailUtils.cs b/Shared/Core/MailUtils.cs index fb40d5b97..cb4857a77 100644 --- a/Shared/Core/MailUtils.cs +++ b/Shared/Core/MailUtils.cs @@ -1,4 +1,5 @@ using BS.Shared.AppSender; +using DevExpress.Mvvm.Native; using System; using System.Collections.Generic; using System.Configuration; @@ -17,6 +18,11 @@ namespace BS.Shared.Core private static readonly Module _GKV_Module2 = new Module("GkvTest", "GKV/EDI/EDAT"); private static readonly Module _AI_Module = new Module("Ai", "AI"); + private static readonly Dictionary _serverMap = new Dictionary() + { + ["WIN-A27H847STS6"] = "app8.bewoplaner.de", + }; + public static bool SendAiModuleErrorMail(string title, string body, string tenant) => SendModuleErrorMail(_AI_Module, title, body, tenant); @@ -56,8 +62,12 @@ namespace BS.Shared.Core body += "\n" + server_str; string hostname = Dns.GetHostName(); - string hostname_str = "Hostname: " + (hostname ?? "unknown"); - body += "\n" + hostname_str; + string hostname_str = "MachineName: " + (hostname ?? "unknown"); + body += "\n\n" + hostname_str; + + string server2 = _serverMap.GetValueOrDefault(hostname, "unknown"); + string server2_str = "ServerMap: " + (server2); + body += "\n" + server2_str; return SendEmail(subject, body, toAddress, senderName, senderEMail, smtpServer, smtpUser, smtpPassword, sendAsync); }