This commit is contained in:
SchreiberM 2024-04-29 13:27:14 +02:00
parent f6b8e78915
commit f3a61bd7f5
2 changed files with 2 additions and 15 deletions

View File

@ -2,4 +2,5 @@
Unknown = 0
NoAttachments = 10001
SenderValidationFailed = 10002
PDFStructureCorrupt = 10003
End Enum

View File

@ -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