diff --git a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb index eb5ab9f2..2f1052c8 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -24,7 +24,6 @@ Public Class ImportZUGFeRDFiles Private Const DIRECTORY_DONT_MOVE = "DIRECTORY_DONT_MOVE" - Private Const EXCEPTION_MAIL_ADDRESS = "info-flow@digitaldata.works" ' List of allowed extensions for PDF/A Attachments ' This list should not contain xml so the zugferd xml file will be filtered out @@ -421,7 +420,7 @@ Public Class ImportZUGFeRDFiles ' Send Email to Digital Data Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) Dim oEmailData As New EmailData With { - .From = EXCEPTION_MAIL_ADDRESS, + .From = oArgs.ExceptionEmailAddress, .Subject = $"OutOfMemoryException im ZUGFeRD-Parser @ {oMessageId}" } _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "OutOfMemoryException", _EmailOutAccountId) @@ -441,7 +440,7 @@ Public Class ImportZUGFeRDFiles ' Send Email to Digital Data Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) Dim oEmailData As New EmailData With { - .From = EXCEPTION_MAIL_ADDRESS, + .From = oArgs.ExceptionEmailAddress, .Subject = $"UnhandledException im ZUGFeRD-Parser @ {oMessageId}" } _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "UnhandledException", _EmailOutAccountId) @@ -468,7 +467,7 @@ Public Class ImportZUGFeRDFiles ' Send Email to Digital Data Dim oBody = CreateBodyForUnhandledException(oMessageId, ex) Dim oEmailData As New EmailData With { - .From = EXCEPTION_MAIL_ADDRESS, + .From = oArgs.ExceptionEmailAddress, .Subject = $"FileMoveException im ZUGFeRD-Parser @ {oMessageId}" } _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileMoveException", _EmailOutAccountId) diff --git a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb b/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb index 46e64e63..06790383 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb @@ -7,6 +7,7 @@ Public Class WorkerArgs Public ErrorDirectory As String Public OriginalEmailDirectory As String Public RejectedEmailDirectory As String + Public ExceptionEmailAddress As String Public AttachmentsSubDirectory As String Public PropertyMap As Dictionary(Of String, XmlItemProperty) Public InsertIntoSQLServer As Boolean @@ -18,6 +19,7 @@ Public Class WorkerArgs OriginalEmailDirectory = Nothing RejectedEmailDirectory = Nothing AttachmentsSubDirectory = Nothing + ExceptionEmailAddress = Nothing PropertyMap = New Dictionary(Of String, XmlItemProperty) InsertIntoSQLServer = False End Sub