Converting .eml file to .msg file

Hello team,

We’ve been working on upgrading to windows compatibility and was using some workaround code to create files in our file system. I’ve been exploring different options to tackle this scenario and have started looking into activities from the MicrosoftOffice365 dependency package since they integrate nicely with Exchange and we would be able to stop using the Outlook application completely.

I’m trying to process a mailbox using REF and save the attachments to the appropriate location. When I encounter an email with emails attached I am having trouble. There is no extension under the attachments property for emails within my UiPath.MicrosoftOffice365.Models.Office365Message returned from the GetMail O365 activity and in the attachmentNamesList property they are listed as .eml files, so that’s what they’re saved as in the file system.

I currently have a VB.NET invoke code section to take the path of a .msg file and save its attachments to another location. To complete the conversion process from old activities to O365 I need an invoke code section to convert the .eml file I have in the file system to a .msg file. I’ve found a solution using the Aspose.Email package but this is expensive for commercial use just for one function and I think it can be simply coded. There could also be another way to do this that I am missing with the new activities but don’t think this scenario has been handled by UiPath.

Thank you for the assistance!

I changed my invoke code portion to extract attachments from the .eml file using the MimeKit open source library. It has limitations such as downloading attached emails but works alright as we can just save the original email for manual processing.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.