ZUGFeRDService: Mask body test for emails, close connection when inserting history entries

This commit is contained in:
Jonathan Jenne 2021-07-12 11:07:27 +02:00
parent 49aedfb44c
commit 5866123893
2 changed files with 6 additions and 1 deletions

View File

@ -75,7 +75,9 @@ Public Class EmailFunctions
Dim oEmailTo = ""
Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED
Dim oCreatedWho = "ZUGFeRD Service"
Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT, BodyText)
Dim oMaskedBodyText = BodyText.Replace("'", "''")
Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT, oMaskedBodyText)
Dim oEmailAddress = pEmailData.From
Dim oAttachment = pEmailData.Attachment

View File

@ -644,6 +644,9 @@ Public Class ImportZUGFeRDFiles
' entry needs to be accessed by MoveAndRenameEmailToRejected shortly after
_firebird.ExecuteNonQueryWithConnection(oSQL, oConnection, Firebird.TransactionMode.WithTransaction)
' Close the connection
oConnection.Close()
Return True
Catch ex As Exception
_logger.Warn("History Entry count not be created for message id [{0}] and md5 [{1}]", MessageId, MD5Checksum)