We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Different attachment name extracted from eml file

Please check this file. When the file is opened in outlook we can see 2 text attachment.
Both of these attachments are extracted by aspose. one of the attachment name is extracted correctly, but another AVG Certification_.txt attachment name is not extracted using the same code. why is it so ?

MailMessage message = MailMessage.Load(filePath);
AttachmentCollection mailAttachments = message.Attachments;
if (mailAttachments != null && mailAttachments.Count > 0)
foreach (var mailAttachment in mailAttachments)
string attachmentname = mailAttachment.name;


Can you please share another code of yours from which you extracted attachment name so that we may further investigate to help you out.

I used the same code that I provided above. Didn’t you find the attachment name different in the code ? You can verify it by opening the eml file, it has different attachment name in outlookfile but the mailattachment.name field provides different attachment name. Please help me


I have worked with sample code shared and have been able to observe the issue. An issue with ID EMAILNET-39684 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thank you. I observed the problem of incorrect attachment name only in the sample eml file with that _AVG_Certification.txt . I think the text file is added if the msg is built with avgmail. I got this in header of attachment. please let us know soon why we are seeing different name in outlook and in attachment name section.
Content Type: text/plain; name=“ATT00002.txt”; x-avg=“cert”; charset=“us-ascii”

Content-Transfer-Encoding: quoted-printable

Content-Disposition: inline

Content-Description: “AVG certification”

Content-ID: <153579ee-8bf2-462e-a001-c85decd9de94>


Thank you for sharing the additional information. I have associated information in our issue tracking system and will share feedback with you as soon as the issue will be addressed.