This commit is contained in:
2020-01-29 15:11:33 +01:00
parent 37693a8fc0
commit fbb4d8ad2e
14 changed files with 17 additions and 114 deletions

View File

@@ -461,6 +461,11 @@ Public Class clsWorkEmail
End If
oMSGID = oMSGID.Replace(">", "").Replace("<", "")
For Each oAttachment As Attachment In oCurrentMail.GetAttachments
Dim oATTFilename = oAttachment.GetFileName.ToString.ToLower
If Not oATTFilename.EndsWith("pdf") Then
Continue For
End If
Dim oAttachmentFileString
Logger.Debug(String.Format(" Working on Attachment [{0}]", oAttachment.GetFileName))
Try
@@ -471,6 +476,7 @@ Public Class clsWorkEmail
End If
oAttachmentFileString = Path.Combine(PATH_TEMP, $"{oMSGID}~{oFilename}")
If System.IO.File.Exists(oAttachmentFileString) = False Then
Logger.Debug(String.Format("Trying to save attachment [{0}]", oAttachmentFileString))
oAttachment.Save(oAttachmentFileString)