diff --git a/App/DigitalData.EMLProfiler/clsWorkEmail.vb b/App/DigitalData.EMLProfiler/clsWorkEmail.vb index 371359b..f4a752e 100644 --- a/App/DigitalData.EMLProfiler/clsWorkEmail.vb +++ b/App/DigitalData.EMLProfiler/clsWorkEmail.vb @@ -691,7 +691,10 @@ Public Class clsWorkEmail 'The original filename part will now be slugified to prevent errors 'when opening the file in windream - Dim oFilename = StringEx.ConvertTextToSlug(oAttachment.SafeFileName) + + Dim oFileInfo1 = New FileInfo(oAttachment.SafeFileName) + Dim oFilenameWithoutExtension = Path.GetFileNameWithoutExtension(oAttachment.SafeFileName) + Dim oFilename = StringEx.ConvertTextToSlug(oFilenameWithoutExtension) & oFileInfo1.Extension Dim oAttachmentFileName = $"{CURRENT_MAIL_MESSAGE_ID}~{pCurrentMail.SenderDomain}~{oFilename}" _Logger.Debug("Final Filename for Attachment: [{0}]", oAttachmentFileName)