Parse EMLX or EMLX to EML/MSG

Hello forum, I used products like EasyMail or MailBee which were super easy to use and getting started, I found aspose email to cover the missing features, like parsing emlx or converting emlx to eml/msg.

Is there a sample code snippet for such basic functions? I found the documentation a bit different and confusing :frowning:
Thanks in advance

@australian.dev.nerds

Please refer to the following article for EMLX to MSG conversion. You can use MailMessage.Save method to save the message file to .eml file format.
How to Convert EMLX to MSG Using C#

1 Like

Hello, thanks bro it was simple, but is there anyway to get the converted message As Byte() array, rather than saving it to disk?

and if we want to do reverse and convert EML to EMLX, what happens when we donโ€™t have SaveOptions.DefaultEmlX?

@australian.dev.nerds

You can use MailMessage.Save method to save the output file to stream object. Once you have stream object, you can convert it to byte array using .NET APIs.

We are working over your query and will get back to you soon.

@australian.dev.nerds

You can use following code example to convert EML to EMLX file format.

MailMessage eml = MailMessage.Load("input.eml");
EmlSaveOptions options = new EmlSaveOptions(MailMessageSaveType.EmlxFormat);
eml.Save("output.emlx", options);
1 Like