Email with attachments wont load

Hi,


I’ve got an email that works in the original GroupDocs viewer (before the UI got split from the back-end). This email has two attachments - one a PDF and the other a PNG.

Expected behaviour:
In the original version (still live on our server) it showed the email as page 1 in the viewer followed by the PDF pages and finally a page for the PNG.

Actual behaviour:
Loading spinner just spins. In the temp folder I can see that the back-end has extracted the attachments.

I have attached the .MSG file and reproduced this with the ASP.NET_MVC_Front_End sample application.

Thanks,
Darryl

Hi Darryl,


Thanks for sharing your issue with us.

We have checked you provided .msg file and the attachments are displayed as expected. Can you please check if you are using the latest source code of ASP.NET_MVC_Front_End? We shall be looking forward to your response.

Have a nice weekend ahead.
Warm Regards

Thanks. I’ll clone the repo now and give it a go so that I can just update it in future.

Hi Usman,


It does indeed work fine in your latest example code. I didn’t realise how often the sample is updated - any chance of putting a version number on it so we can see at a glance? Thanks.

I’m not sure why it works in your code but not mine - I copied your ViewerController class into our website, but the attachments still failed load because the temp folder it was looking for was “C:\GD-CC\temp\A4464.C490.Example email with Attachments_msg\attachments\Construction Site Checklist.pdf” rather than “C:\GD-CC\temp\A4464_C490_Example email with Attachments_msg\attachments\Construction Site Checklist.pdf”. I modified the code to replace “.” with “_” to do it to the entire docInfo.Guid. (in ViewerController.ViewDocumentAsHtml()).


The code in the MVC demo app has:
var attachmentPath = tempPath + “\” + Path.GetFileNameWithoutExtension(docInfo.Guid) + Path.GetExtension(docInfo.Guid).Replace(".", "") + “\attachments\” + attachment.Name;

Which only replaces “.” characters in the file extension.

Now this much works - I can see that we only get a thumbnail for the first page.

The demo app only has thunbnails turned on for the image render mode - and that is not showing the attachments at all.

Hi Darryl,


Thanks for sharing the details.

The source code on GitHub repository is updated in following cases:
  • After every release of GroupDocs.Viewer for .NET API
  • After the fix of any of the GitHub Issues

You can create a watch on the repository in order to get notifications when the code is updated. Furthermore, I can see that thumbnails of the attachments are not visible. Therefore, I have logged it in our GitHub Issues as https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/issues/124. In case of any updates related to this, we’ll notify you.

You can turn on the thumbnails for HTML based viewer using the showThumbnails: true, in the index.cshtml page.

Have a nice weekend ahead.
Warm Regards

Hi Darryl,


We are happy to inform you that your reported issue logged in GitHub issues as https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET/issues/124 has been resolved. Please download the latest source code from the GitHub repository.

Warm Regards
Hi Usman,

I just wanted to express my gratitude for the way you handle these issues. I think you can appreciate my frustration that every time I think something is working, we dig a little deeper and there is another problem. We felt that the overall quality of the GroupDocs viewer product deteriorated with the decision to separate the front-end from the back-end.

Your quick responses to all of my queries along with the well thought out and helpful replies go a long way to make up for the inconvenience.

I can see the effort you are making and it is appreciated.

We've got a product that is working acceptably at the moment. The GroupDocs viewer component is one aspect of our software that our customers are impressed by. We found another issue with the download option not including attachments - but it is currently downloading everything as a PDF - I am hoping that is just a config option - so I'll try it and post another thread if I cannot get it to work like the old version.

Thanks again,
Darryl.

It didn’t take me long to find the downloadPdfFile: true in the example. Changing that to false reverts to the original behaviour. I don’t know if the PDF should include attachments though, but I’m happy because we want them to be able to download the original file anyway.


Thanks again,
Darryl

Hi Darryl,


Thanks for sharing your thoughts.

In fact, the back-end GroupDocs.Viewer for .NET API is disintegrated from the front end UI to enable the users to make their own customized front end applications as per their requirements which was not possible with the older versions. The GroupDocs.Viewer for .NET 3.0.0 and greater is providing a generalize way to implement the code for multiple types of application development. In the previous versions, there were specific ways of code implementation for different types of Application development, e.g a user control was provided for Win Form apps and for web apps, a method was provided to generate Html Code. However, now you can use this API in a variety of .NET applications i-e web apps, desktop apps, web services etc.

Furthermore, its good to know that you have found the solution to be able to download the original file. You can also visit: https://docs.groupdocs.com/display/viewernet/Render+a+Document+as+it+is+(original+form) for more details.

Warm Regards