Signed attachments in eml file


#1

Hi there!
I’m viewing an eml file using your Viewer library in a .NET mvc project. With the Attachments property in DocumentInfoContainer, i developed a dropdown menu to show eml attachments. The stream is then retrieved by the method GetFile in ImageHandler.
It works very fine but i’ve a problem with signed (.p7m) attachments files. The name of the attachment is full (example pdf.p7m) but the stream is the clean pdf (saving the stream to a file on the disk is opened with no problem by acrobat reader)
My question is: does the method GetFile provide an automatic decode of signed files? If yes, for what extensions? I didn’t find anything on documentation :frowning:

Many Thanks!!
Gianluca


#2

@gian_boscolo_hotmail_it,

Thanks for your inquiry.

I am afraid that currently GroupDocs.Viewer doesn’t support P7M files. However, please share with us some sample eml files with P7M attachment so that we can check if it is possible to provide its support in the future. We shall be looking forward to hearing from you.


#3

dacd73f2-7fcc-425c-b599-36b963d5c78b.zip (195.6 KB)

There’s an example file! many thanks

Gianluca


#4

@gian_boscolo_hotmail_it,

Thanks for sharing the sample file. We have logged a new feature request for the support of P7M file format in our Issue Tracking System as VIEWERNET-1826. We shall keep you notified in case of any updates.

As a workaround, we have created a sample console application for you that deals with P7M attachments. You can download this application from here (202.1 KB). Hope it helps.


#5

Hi thanks for the sample application! As i can see from the code, the p7m attachments are always decrypted by your library… Is this correct? Can i simply replace the .p7m extension with an empty string? Is this feature available for other sign extensions of the attachments? Many thanks,

Gianluca


#6

@gian_boscolo_hotmail_it,

Thanks for your response.

In fact, GroupDocs.Viewer doesn’t provide the feature of decrypting the encrypted email message (i.e P7M file) that contains the sensitive content or attachment. The workaround that we have shared with you in the previous message first saves the .p7m file as a PDF file and then renders it using GroupDocs.Viewer. Hence, you can not directly render a P7M file using our API. You can also use the same workaround for other sign extensions of the attachments that can be saved and viewed as PDF file (or other file formats supported by GroupDocs.Viewer). Hope it helps