From a97fa3dab40d82bb70e82da91d41613f7e79607d Mon Sep 17 00:00:00 2001 From: pitzm Date: Wed, 24 Apr 2024 14:49:10 +0200 Subject: [PATCH] Email Profiler Common: Reihenfolge der SQL Aufrufe korrigiert --- App/EmailProfiler.Common/clsWorkEmail.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/App/EmailProfiler.Common/clsWorkEmail.vb b/App/EmailProfiler.Common/clsWorkEmail.vb index 41e75e0..238cdf3 100644 --- a/App/EmailProfiler.Common/clsWorkEmail.vb +++ b/App/EmailProfiler.Common/clsWorkEmail.vb @@ -190,13 +190,15 @@ Public Class clsWorkEmail If CURRENT_ATTMT_COUNT = 0 Then _Logger.Info("### Mail contained no Attachments!! ###") + InsertHistoryEntryWithStatus(CurrentMail, "REJECTED", "No Attachments") + Dim oBody = EmailStrings.EMAIL_NO_FERDS 'If AddEmailToQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID) = True Then If AddToEmailQueueMSSQL(CurrentMail.MessageId, oBody, "No Attachments", _EmailAccountID, _RejectionTemplateId, ErrorCode.NoAttachments, "", "") = True Then CURRENT_ImapObject.DeleteMessageByUID(poUID) End If - InsertHistoryEntryWithStatus(CurrentMail, "REJECTED", "No Attachments") + Else InsertHistoryEntry(CurrentMail) End If @@ -316,7 +318,7 @@ Public Class clsWorkEmail '{pMessageId}' , 0 , {pEmailAccountId} - , 'ZUGFeRD Service' + , 'DDEmailProfiler' , {pTemplateId} , '{pErrorCode}' , '{pParameter1}'