MS Config Common Paths DMZ Version 1.4

This commit is contained in:
2024-02-21 09:19:19 +01:00
parent 02a197e535
commit 51741be5de
4 changed files with 25 additions and 4 deletions

View File

@@ -77,8 +77,15 @@ Namespace Jobs
ReportCreator = New ReportCreator(LogConfig, oState)
Logger.Debug("DocumentPath: [{0}]", Config.DocumentPath)
If Config.DocumentPath_DMZ <> String.Empty Then
Logger.Debug("DMZ-DocPath configured: [{0}] - Overwrite Document-Path", Config.DocumentPath_DMZ)
Config.DocumentPath = Config.DocumentPath_DMZ
End If
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
If Config.ExportPath_DMZ <> String.Empty Then
Logger.Debug("DMZ-ExportPath configured: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
Config.ExportPath = Config.ExportPath_DMZ
End If
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTimeInMinutes}"
Dim oTable = Database.GetDatatable(oSql)
@@ -192,6 +199,13 @@ Namespace Jobs
If oMailToReceivers <> FinalEmailType.No Then
Logger.Debug("Sending emails to receivers..")
If Config.SignedMail_Path <> String.Empty And Config.ExportPath_DMZ <> String.Empty Then
Logger.Debug("SignedMailPath configured: [{0}] - Replacing Attachment-Path", Config.SignedMail_Path)
Logger.Debug("Attachment-Path BEFORE replace: [{0}]", pAttachment)
pAttachment.Replace(Config.ExportPath, Config.SignedMail_Path)
Logger.Debug("Attachment-Path AFTER replace: [{0}]", pAttachment)
End If
SendFinalEmailToReceivers(pEnvelope, pAttachment)
End If
@@ -221,6 +235,7 @@ Namespace Jobs
Logger.Debug("Attachment included: [{0}]", oIncludeAttachment)
If oIncludeAttachment Then
oAttachment = pAttachment
End If