DakotaSender Mail Anbindung
This commit is contained in:
@@ -17,5 +17,11 @@
|
||||
<add key="ProcessWaitForExitMs" value="10000" />
|
||||
<add key="LogPath" value="C:\GkvAbrechnung\Sender\log.txt" />
|
||||
<add key="GkvSecretKey" value="DfDGNGn72PKfSYxSUsmRdzuBtpR9novewlmYU3gsjiFgSkaZZeylUXlbO42cWNqiKgLdMUFtWUNZT962F1raQDR7HGUzCNYsFeC" />
|
||||
<add key="SendMailModuleSmtpServer" value="mail.ownsoft.de" />
|
||||
<add key="SendMailModuleGkvEnabled" value="true" />
|
||||
<add key="SendMailModuleGkvSmtpUser" value="bewoplaner.support@ownsoft.de" />
|
||||
<add key="SendMailModuleGkvSmtpPassword" value="JJVjJntw2yaRDAxInotF" />
|
||||
<add key="SendMailModuleGkvSender" value="noreply@bewoplaner.de" />
|
||||
<add key="SendMailModuleGkvReceiver" value="dakota.exchange@ownsoft.de" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -1,5 +1,6 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.AppSender;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.GkvAbrechnung;
|
||||
using BS.Shared.Exceptions;
|
||||
@@ -46,7 +47,7 @@ namespace DakotaSender
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
PrintException(e);
|
||||
HandleException(e, null);
|
||||
|
||||
if (is_dakota_running)
|
||||
{
|
||||
@@ -99,7 +100,12 @@ namespace DakotaSender
|
||||
Print($"Verarbeite Datei: {file.SourceNutzdatendatei.Name}");
|
||||
PrintLine($"(T:{file.Tenant}, U:{file.ApplicationUserOid}, P:{file.ProtokollOid}, D:{file.Datenannahmestelle})");
|
||||
}
|
||||
internal static void PrintException(Exception e) => PrintLine(e.ToString());
|
||||
internal static void HandleException(Exception e, string tenant)
|
||||
{
|
||||
MailUtils.SendGkvModuleErrorMail("GkvSender Exception", e, tenant);
|
||||
|
||||
PrintLine(e.ToString());
|
||||
}
|
||||
|
||||
static void CheckDakotaStatus()
|
||||
{
|
||||
@@ -158,6 +164,8 @@ namespace DakotaSender
|
||||
}
|
||||
static DakotaSystemFile ScanQueueFile(FileInfo auft)
|
||||
{
|
||||
string tenant = null;
|
||||
|
||||
try
|
||||
{
|
||||
var nutz_fullname = auft.FullName.Substring(0, auft.FullName.Length - 4);
|
||||
@@ -172,7 +180,7 @@ namespace DakotaSender
|
||||
PrintLine($"- {auft.FullName}");
|
||||
|
||||
var split = nutz.Name.Split('_');
|
||||
var tenant = split[0];
|
||||
tenant = split[0];
|
||||
var app_oid = long.Parse(split[1]);
|
||||
var p_oid = long.Parse(split[2]);
|
||||
var datenannahmestelle = split[3];
|
||||
@@ -201,7 +209,7 @@ namespace DakotaSender
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
PrintException(e);
|
||||
HandleException(e, tenant);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -409,11 +417,11 @@ namespace DakotaSender
|
||||
}
|
||||
catch (GkvException e)
|
||||
{
|
||||
PrintException(e);
|
||||
HandleException(e, tenant);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
PrintException(e);
|
||||
HandleException(e, tenant);
|
||||
}
|
||||
|
||||
PrintSeperator();
|
||||
|
||||
Reference in New Issue
Block a user