Compare commits
2 Commits
5fd352dd1a
...
187c869560
| Author | SHA1 | Date | |
|---|---|---|---|
| 187c869560 | |||
| acdbf643fb |
@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("")>
|
<Assembly: AssemblyCompany("")>
|
||||||
<Assembly: AssemblyProduct("DigitalData.EMLProfiler")>
|
<Assembly: AssemblyProduct("DigitalData.EMLProfiler")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||||
<Assembly: AssemblyTrademark("3.0.9.0")>
|
<Assembly: AssemblyTrademark("3.0.10.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@ -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.9.0")>
|
<Assembly: AssemblyVersion("3.0.10.0")>
|
||||||
<Assembly: AssemblyFileVersion("3.0.9.0")>
|
<Assembly: AssemblyFileVersion("3.0.10.0")>
|
||||||
|
|||||||
@ -653,6 +653,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
Dim oPathOriginal As String = oRow.ItemEx("PATH_ORIGINAL", "")
|
Dim oPathOriginal As String = oRow.ItemEx("PATH_ORIGINAL", "")
|
||||||
Dim oExtractMainPath As String = oRow.ItemEx("PATH_EMAIL_TEMP", "")
|
Dim oExtractMainPath As String = oRow.ItemEx("PATH_EMAIL_TEMP", "")
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oSplit As String()
|
Dim oSplit As String()
|
||||||
Dim oStorage As String
|
Dim oStorage As String
|
||||||
@ -692,8 +693,8 @@ Public Class clsWorkEmail
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
If Copy2HDD(pCurrentMail, oRow("COPY_2_HDD"), oRow("PATH_ORIGINAL"), oRow("PATH_EMAIL_ERRORS"), True) = True Then
|
If Copy2HDD(pCurrentMail, oRow("COPY_2_HDD"), oRow("PATH_ORIGINAL"), oRow("PATH_EMAIL_ERRORS"), True) = True Then
|
||||||
|
Dim oAllowXMLReceipts As Boolean = oRow("ALLOW_XML_RECEIPTS")
|
||||||
If ExtractAttachments(pCurrentMail, oExtractMainPath) = True Then
|
If ExtractAttachments(pCurrentMail, oExtractMainPath, oAllowXMLReceipts) = True Then
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
_Logger.Warn("!##Returning false from EXTRACT_ATTACHMENTS!##")
|
_Logger.Warn("!##Returning false from EXTRACT_ATTACHMENTS!##")
|
||||||
@ -917,7 +918,7 @@ Public Class clsWorkEmail
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ExtractAttachments(pCurrentMail As MailContainer, pExtractPath As String) As Boolean
|
Private Function ExtractAttachments(pCurrentMail As MailContainer, pExtractPath As String, pAllowXMLReceipts As Boolean) As Boolean
|
||||||
_Logger.Debug("In ExtractAttachments - pExtractPath = [{0}]", pExtractPath)
|
_Logger.Debug("In ExtractAttachments - pExtractPath = [{0}]", pExtractPath)
|
||||||
|
|
||||||
CURRENT_ATTMT_COUNT = 0
|
CURRENT_ATTMT_COUNT = 0
|
||||||
@ -955,7 +956,7 @@ Public Class clsWorkEmail
|
|||||||
}
|
}
|
||||||
EmailAttachments.Add(oEmailAttachment)
|
EmailAttachments.Add(oEmailAttachment)
|
||||||
|
|
||||||
If ValidateFileExtension(oEmailAttachment) = False Then
|
If ValidateFileExtension(oEmailAttachment, pAllowXMLReceipts) = False Then
|
||||||
oEmailAttachment.ErrorCodeValue = ErrorCode.NormalFileAttachmentCorrupt
|
oEmailAttachment.ErrorCodeValue = ErrorCode.NormalFileAttachmentCorrupt
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
@ -1045,7 +1046,7 @@ Public Class clsWorkEmail
|
|||||||
|
|
||||||
oEmbeddedFile.FileStatus = pGDPicturePDF.GetStat()
|
oEmbeddedFile.FileStatus = pGDPicturePDF.GetStat()
|
||||||
If oEmbeddedFile.FileStatus = GdPictureStatus.OK Then
|
If oEmbeddedFile.FileStatus = GdPictureStatus.OK Then
|
||||||
If ValidateFileExtension(oEmbeddedFile) = False Then
|
If ValidateFileExtension(oEmbeddedFile, False) = False Then
|
||||||
oEmbeddedFile.ErrorCodeValue = ErrorCode.EmbeddedFileAttachmentCorrupt
|
oEmbeddedFile.ErrorCodeValue = ErrorCode.EmbeddedFileAttachmentCorrupt
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
@ -1133,14 +1134,14 @@ Public Class clsWorkEmail
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ValidateFileExtension(pAttachmentData As EmailAttachment) As Boolean
|
Private Function ValidateFileExtension(pAttachmentData As EmailAttachment, pAllowXMLReceipts As Boolean) As Boolean
|
||||||
_Logger.Debug("Validate extension of [{0}]", pAttachmentData.OrgFileName)
|
_Logger.Debug("Validate extension of [{0}]", pAttachmentData.OrgFileName)
|
||||||
|
|
||||||
Dim lowerFilename = pAttachmentData.OrgFileName.ToLower
|
Dim lowerFilename = pAttachmentData.OrgFileName.ToLower
|
||||||
Dim oIsValidExtension As Boolean = False
|
Dim oIsValidExtension As Boolean = False
|
||||||
Dim oIsGraphicExtension = _GraphicExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
Dim oIsGraphicExtension = _GraphicExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
||||||
|
|
||||||
If pAttachmentData.AttachmentPosition = 1 Then
|
If pAllowXMLReceipts = True AndAlso pAttachmentData.AttachmentPosition = 1 Then
|
||||||
oIsValidExtension = _ValidFirstExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
oIsValidExtension = _ValidFirstExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
||||||
Else
|
Else
|
||||||
oIsValidExtension = _ValidExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
oIsValidExtension = _ValidExtensions.Any(Function(ext) lowerFilename.EndsWith(ext))
|
||||||
|
|||||||
@ -15,7 +15,7 @@ Public Class ExtractAttachmentsFromEMLFile
|
|||||||
|
|
||||||
Public Sub CallWorkerProcess(pEMLFilename As String, pConfigData As ConfigData)
|
Public Sub CallWorkerProcess(pEMLFilename As String, pConfigData As ConfigData)
|
||||||
|
|
||||||
Dim oProfileIdForPolling = 0
|
Dim oProfileIdForPolling = 1
|
||||||
Dim oWorker As New clsWorker(_LogConfig,
|
Dim oWorker As New clsWorker(_LogConfig,
|
||||||
pConfigData.ConnectionString,
|
pConfigData.ConnectionString,
|
||||||
"",
|
"",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user