Free Support Forum - groupdocs.com

Specify the email attachments file format when rendering MSG in .NET

Hi,

I’m having troubles with converting / viewing a MSG email that is an attachment of another email.
Using the basic Viewer sample with the attached email instead, attachment.FileName is just “Email” and not “Email.msg”
Email with another email as attachment.zip (19.5 KB)

The sample code runs fine, but the file is written to disk without extension.
This causes a followup error when attempting the conversion because of the missing extension.
Am I doing something wrong or is this a bug?

1 Like

@Clemens_Pestuka,

We are investigating this scenario. Your investigation ticket ID is VIEWERNET-2309. As there is any update, we’ll notify you.

1 Like

@Clemens_Pestuka,

Currently, API cannot add extension to the FileName because the attachment file itself doesn’t have an extension. But there is a workaround. In upcoming version of the API, we are going to add FileType property to the Attachment class. We’ll set FileType based on attachment file extension when it exists or based on an attachment media type when the media type is provided. Please let us know if that’d be helpful for you.

@atirtahir3
Sounds good, I think I can work with that.
Thank you for your help :+1:
Looking forward to the next version :slight_smile:

1 Like

@Clemens_Pestuka,

You are welcome :slight_smile:
We’ll notify you, once the release is available.