Free Support Forum - aspose.com

Txt-file attachment as validate mime message

Hello Support,
I have a problem with Aspose.Email version 18.9.0.0
A email has txt-attachment. If I check the attachment with MailMessage.ValidateMessage(contentStream).Count == 0 this will be true.

       foreach (var attachment in attachmentList)
        {
            object mailMessage = null;
            var contentStream = attachment.ContentStream;
            string ext = null;

            if (MailMessage.ValidateMessage(contentStream).Count == 0)
            {
                 contentStream.Seek(0, SeekOrigin.Begin);
                 mailMessage = MailMessage.Load(contentStream);
                 ext = @"msg";
            }
       }

this is new in version 18.9.0.0
Any idea?

Thanks
Zhentao Song

@zhentaosong,

We were unable to reproduce the issue that you reported. We tested this scenario using an EML file containing text attachment. We have attached the sample EML file for your convenience. If possible, please share the sample file that you used for testing so that we can investigate this further.
Aspose Text Attachment.zip (5.2 KB)

Hello Muhammad,
Can you test my attachment 73336.txt?
I use Outlook to send mail and add this file as attachment.
attachment.zip (1.8 KB)

Thanks
Zhentao Song

@zhentaosong,

We were able to reproduce the issue by using the TXT file provided by you. We have logged a ticket in our issue tracking system as EMAILNET-39178 to investigate it further. We will update you here as soon as additional information is available.

The issues you have found earlier (filed as EMAILNET-39178) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan