V 3.0.3.0 graphic extension behavior (png, jpeg)

This commit is contained in:
SchreiberM 2024-05-17 14:25:29 +02:00
parent be743445e5
commit ce52218a5e
2 changed files with 6 additions and 5 deletions

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.0.2.0")> <Assembly: AssemblyVersion("3.0.3.0")>
<Assembly: AssemblyFileVersion("3.0.2.0")> <Assembly: AssemblyFileVersion("3.0.3.0")>

View File

@ -837,18 +837,19 @@ Public Class clsWorkEmail
oATTFilename = oAttachment.SafeFileName.ToString.ToLower oATTFilename = oAttachment.SafeFileName.ToString.ToLower
Dim oValidExtensions = New List(Of String) From {"pdf", "xls", "xlsx", "doc", "docx", "ppt", "pptx"} Dim oValidExtensions = New List(Of String) From {"pdf", "xls", "xlsx", "doc", "docx", "ppt", "pptx"}
Dim oGraphicExtensions = New List(Of String) From {"jpg", "bmp", "jpg", "gif", "xml"} Dim oGraphicExtensions = New List(Of String) From {"jpg", "bmp", "jpg", "gif", "xml", "png", "jpeg"}
Dim oValidExt = oValidExtensions.Any(Function(ext) oATTFilename.EndsWith(ext)) Dim oValidExt = oValidExtensions.Any(Function(ext) oATTFilename.EndsWith(ext))
If oValidExt = False Then If oValidExt = False Then
_Logger.Info("Invalid FileExtension [{0}]", oATTFilename) _Logger.Info("Potentially invalid fileExtension [{0}] ...", oATTFilename)
Dim GraphicExt = oGraphicExtensions.Any(Function(ext) oATTFilename.EndsWith(ext)) Dim GraphicExt = oGraphicExtensions.Any(Function(ext) oATTFilename.EndsWith(ext))
If GraphicExt = False Then If GraphicExt = False Then
Dim oInfo = $"Consistency or extension of attached file {oATTFilename} is not ok." Dim oInfo = $"Consistency or extension of attached file {oATTFilename} is not ok."
AddTrackingStatusMSSQL(CurrentMail.MessageId, oInfo, "PDF CONSISTENCY NOT OK", "Info GUI", "EML_PROF_EXTR_ATT1") AddTrackingStatusMSSQL(CurrentMail.MessageId, oInfo, "PDF CONSISTENCY NOT OK", "Info GUI", "EML_PROF_EXTR_ATT1")
AddToEmailQueueMSSQL(CurrentMail.MessageId, oInfo, "PDF CONSISTENCY NOT OK", _EmailAccountID, AddToEmailQueueMSSQL(CurrentMail.MessageId, oInfo, "PDF CONSISTENCY NOT OK", _EmailAccountID,
_InfoTemplateId, ErrorCode.PDFStructureCorrupt, oATTFilename, "") _InfoTemplateId, ErrorCode.PDFStructureCorrupt, oATTFilename, "")
Else
_Logger.Info("..but graphic extension!")
End If End If
Continue For Continue For