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

Free Support Forum - aspose.com

Cannot convert EML attachments to pdf

In this project I am currently working on I have to convert EML files to PDF and of course, if any .eml has attachments inside, I want to take them out and convert them too.
When I try for .msg files it works perfectly. But when I try with .eml files, MapiMessage gives me this error "Message = "This is not a structured storage file."
How can I achieve the same convertion with .eml files too ?
Thanks in advance.

PS. My code is written on C#.

@LeotrimRamadani

Could you please ZIP and attach your input EML file here for testing? We will investigate the issue and provide you more information on it.

Here you have the EML file for testing.
test_sample_message.zip (6.0 KB)
.

@LeotrimRamadani

We have tested the scenario using the latest versions of Aspose.Words for .NET 21.12 and Aspose.Email for .NET 21.11. We have not found the shared issue. So, please upgrade to the latest versions of Aspose.Words and Aspose.Email.

The links you provided seem to be for creating/sending a new email and/or converting a specific file to a specific format.
What I need is get eml attachment and convert it to pdf.
Can you show me the code you have tried this scenario with, please?
Thank you for your time and efforts.

@LeotrimRamadani

Please read following article about extracting attachment from .eml file.
Extracting Email Attachments

Could you please share the attachment file type of your .eml file? Please also share the .eml file. We will then provide you more information about your query along with code example.