Email Profiler Common: Reihenfolge der SQL Aufrufe korrigiert

This commit is contained in:
PitzM 2024-04-24 14:49:10 +02:00
parent 7443e850f9
commit a97fa3dab4

View File

@ -190,13 +190,15 @@ Public Class clsWorkEmail
If CURRENT_ATTMT_COUNT = 0 Then If CURRENT_ATTMT_COUNT = 0 Then
_Logger.Info("### Mail contained no Attachments!! ###") _Logger.Info("### Mail contained no Attachments!! ###")
InsertHistoryEntryWithStatus(CurrentMail, "REJECTED", "No Attachments")
Dim oBody = EmailStrings.EMAIL_NO_FERDS Dim oBody = EmailStrings.EMAIL_NO_FERDS
'If AddEmailToQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID) = True Then 'If AddEmailToQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID) = True Then
If AddToEmailQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID, If AddToEmailQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID,
_RejectionTemplateId, ErrorCode.NoAttachments, "", "") = True Then _RejectionTemplateId, ErrorCode.NoAttachments, "", "") = True Then
CURRENT_ImapObject.DeleteMessageByUID(poUID) CURRENT_ImapObject.DeleteMessageByUID(poUID)
End If End If
InsertHistoryEntryWithStatus(CurrentMail, "REJECTED", "No Attachments")
Else Else
InsertHistoryEntry(CurrentMail) InsertHistoryEntry(CurrentMail)
End If End If
@ -316,7 +318,7 @@ Public Class clsWorkEmail
'{pMessageId}' '{pMessageId}'
, 0 , 0
, {pEmailAccountId} , {pEmailAccountId}
, 'ZUGFeRD Service' , 'DDEmailProfiler'
, {pTemplateId} , {pTemplateId}
, '{pErrorCode}' , '{pErrorCode}'
, '{pParameter1}' , '{pParameter1}'