diff --git a/App/EmailProfiler.Common/ErrorCode.vb b/App/EmailProfiler.Common/ErrorCode.vb index 9f9282d..c8bdb26 100644 --- a/App/EmailProfiler.Common/ErrorCode.vb +++ b/App/EmailProfiler.Common/ErrorCode.vb @@ -2,4 +2,5 @@ Unknown = 0 NoAttachments = 10001 SenderValidationFailed = 10002 + PDFStructureCorrupt = 10003 End Enum diff --git a/App/EmailProfiler.Common/clsWorkEmail.vb b/App/EmailProfiler.Common/clsWorkEmail.vb index 238cdf3..47dd9d2 100644 --- a/App/EmailProfiler.Common/clsWorkEmail.vb +++ b/App/EmailProfiler.Common/clsWorkEmail.vb @@ -553,6 +553,7 @@ Public Class clsWorkEmail End Try If COPY2HDD(pCurrentMail, oRow("COPY_2_HDD"), oRow("PATH_ORIGINAL"), oRow("PATH_EMAIL_ERRORS"), True) = True Then + 'ToDo Konsistenz prüfen If EXTRACT_ATTACHMENTS(pCurrentMail, oExtractMainPath, oRow("PATH_EMAIL_ERRORS")) = True Then Return True @@ -813,21 +814,7 @@ Public Class clsWorkEmail Dim oAttachmentFilePath = "" _Logger.Info("Working on Attachment [{0}]", oAttachment.SafeFileName) Try - 'Dim oFilename = oAttachment.SafeFileName - 'oFilename = CleanInput(oFilename) - 'Logger.Debug($"oFilename [{oFilename}]") - 'If oFilename = String.Empty Then - ' oFilename = oAttachment.SafeFileName - 'End If - '05.06.23 - 'The filename of attachments will be HASH~DOMAIN~SUBJECT(0,25) from now on - 'oAttachmentFileString = Path.Combine(PATH_TEMP, $"{CURRENT_MAIL_MESSAGE_ID}~{oFilename}") - '28.07.23 - 'The original filename part will now be slugified to prevent errors - 'when opening the file in windream - '05.09.23 - 'The filename will now only contain a hash and a counter to prevent all errors relating to filenames and subject lines being shit Dim oFileInfo = New FileInfo(oAttachment.SafeFileName) Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(oAttachment.SafeFileName) @@ -850,7 +837,6 @@ Public Class clsWorkEmail Dim oFileLenth As Long = oFileInfo1.Length If oFileLenth > 2 Then _Logger.Info(String.Format("Attachment saved to [{0}]", oAttachmentFilePath)) - 'INSERT_HISTORY_FB(CURRENT_MAIL_MESSAGE_ID, oAttachment.SafeFileName) InsertAttachmentHistoryEntry(pCurrentMail, oAttachment.SafeFileName, oAttachmentFileName) oAttachmentCount += 1 Else