fix handling embedded msg files without extension (looking at u, outlook)

This commit is contained in:
Jonathan Jenne
2020-03-24 14:09:41 +01:00
parent 0e737888f1
commit f6a6626c37
2 changed files with 29 additions and 3 deletions

View File

@@ -104,7 +104,20 @@ Public Class ClassFilehandle
Else
attachment_name = attachment.LongFileName
End If
If Not attachment_name.Contains("inline") Then
If attachment.EmbeddedMessage IsNot Nothing Then
attachment_name = ClassFilehandle.InvalidCharacters(attachment_name)
tempfile = Path.Combine(Path.GetTempPath, attachment_name & ".msg")
tempfile = ClassFilehandle.Versionierung_Datei(tempfile)
If tempfile <> String.Empty Then
Dim oMessage = attachment.EmbeddedMessage
oMessage.Save(tempfile)
TEMP_FILES.Add(tempfile)
LOGGER.Info(">> Attachment (" & i1 & "):" & tempfile)
erfolgreich = Insert_GI_File(tempfile, ATT_EXTR)
i1 += 1
End If
ElseIf Not attachment_name.Contains("inline") Then
'Sonderzeichen entfernen
attachment_name = ClassFilehandle.InvalidCharacters(attachment_name)
tempfile = Path.Combine(Path.GetTempPath, attachment_name)