From 12e9538968214ef1f75399083bd30954ff95a14c Mon Sep 17 00:00:00 2001 From: Developer01 Date: Wed, 3 Dec 2025 13:07:09 +0100 Subject: [PATCH] clsWorkEmail --- App/EmailProfiler.Common/clsWorkEmail.vb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/App/EmailProfiler.Common/clsWorkEmail.vb b/App/EmailProfiler.Common/clsWorkEmail.vb index ea46e03..6b2ba38 100644 --- a/App/EmailProfiler.Common/clsWorkEmail.vb +++ b/App/EmailProfiler.Common/clsWorkEmail.vb @@ -101,11 +101,11 @@ Public Class clsWorkEmail 'TODO: Move all of these CURRENT_MAIL vars into a business object of type mail container _CurrentMail = New MailContainer(pMailMessage, poUID) - _Logger.Info($"Working on email from: {_CurrentMail.SenderAddress} - Subject: {_CurrentMail.SubjectOriginal} - MessageID: {_CurrentMail.MessageId}") - CURRENT_MAIL_BODY_ALL = String.Empty - CURRENT_MAIL_BODY_ANSWER1 = String.Empty - CURRENT_MAIL_BODY_Substr2 = String.Empty - CURRENT_MAIL_SUBJECT = String.Empty + _Logger.Debug($"Working on email from: {_CurrentMail.SenderAddress}...Subject: {pMailMessage.Subject}") + CURRENT_MAIL_BODY_ALL = "" + CURRENT_MAIL_BODY_ANSWER1 = "" + CURRENT_MAIL_BODY_Substr2 = "" + CURRENT_MAIL_SUBJECT = pMailMessage.Subject.ToUpper.EscapeForSQL() CURRENT_MAIL_UID = poUID @@ -209,7 +209,9 @@ Public Class clsWorkEmail _Logger.Debug("CommonEmail-Process-Sniffer") ' Allgemeine Verarbeitung der EMail - If CommonEmail_IN(_CurrentMail) = False Then + Dim oCommonEmailResult = CommonEmail_IN(_CurrentMail) + + If oCommonEmailResult = False Then Return False End If @@ -538,7 +540,7 @@ Public Class clsWorkEmail Try _Logger.Info(String.Format("PM-related message found....[{0}]", pCurrentMail.Mail.Subject)) - + _Logger.Debug(String.Format("PM-related message found....[{0}]", pCurrentMail.Mail.Subject)) Dim oExpression = "PROCESS_NAME = 'ProcessManager'" 'Filter the rows using Select() method of DataTable Dim TEMP_PROCESS_PROFILE_DT As DataTable = DT_POLL_PROCESS @@ -1002,6 +1004,7 @@ Public Class clsWorkEmail Any(Function(emb) emb.EmbeddedFiles.Any(Function(ext) ext.IsAttachmentValid = False)) If oEmbeddedAttachmentsNotValid = True Then + MESSAGE_ERROR = True Continue For End If @@ -1014,7 +1017,7 @@ Public Class clsWorkEmail oEmailAttachment.ErrorCodeValue = ErrorCode.NormalFileAttachmentCorrupt oEmailAttachment.ErrorCodeComment = "PDF Structure corrupt" oEmailAttachment.IsAttachmentValid = False - + MESSAGE_ERROR = True Continue For End If