EML to MSG converter and removing emails from a mailmessage list

Hi there,

I am using a robot to get emails and save them as msg files. However, the EML to MSG converter tool has a fault that prevents conversion with embedded images. This never used to be an issue but has appeared recently (maybe as we’ve updated the platform). I therefore need a solution to either:
a) Convert despite the error, or
b) Remove the mail message from my list variable within a catch sequence so that my process can continue

I think a might be a problem that only the developer of the converter can solve, but I do not know about the feasibility of b.

In b, my process would detect the error in a try/catch to convert, and in the catch perform a logging of the error, moving the email to an error folder in outlook, then remove the email from the list before continuing to the next email. Because it needs to continue I cannot use a fresh get outlook mail messages command.

Thanks.

@SoqedHozi , You can use alphabet activities to save your mail message directly to .msg format with preserving all the formats of the mail.
Mark it as a solution if it helps.

Cheers :slight_smile:

Not ideal I’m afraid - I still need the .eml file and I’ve tried alphabet activities before and they did not work for me. It would only be value to me if I could use it only within a catch block and unfortunately I would not be able to get the 1 offending email.

I suppose I could replace my entire chain with save eml and save msg, but as I said save as msg did not work for me before.

Can you please share the error snapshot which you got while using alphabet activities, I can check that hence it worked for me. :slight_smile:

I cannot, as this robot has been in production without it for about 10 months now. I do not have a record of the error from before then.

I’d also rather not completely change the process, especially to just try these activities, because of this. It has worked for a long time without issue. I would ideally just like to be able to catch the error in such a way that I can continue with the process, or make the existing process work.

@Nikhilesh_Mishra
Because I need this working I’ve tried to use the alphabet activity, but as before it has failed.

message":"Save outlook mail as: The operation failed

The operation failed.

at Microsoft.Office.Interop.Outlook.NameSpaceClass.GetItemFromID(String EntryIDItem, Object EntryIDStore)
at Alphabet.Outlook.AlphabetOutlookApi.getMailItem(MailMessage message)
at Alphabet.Outlook.AlphabetOutlookApi.saveMailMessageAs(MailMessage message, String path, MailOutput outputFormat)
at Alphabet.Outlook.SaveOutlookMailAs.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

image

Can anyone help me please? I am unable to work as the robot will fail if an email cannot be converted, and alphabet is not a solution as shown above. I feel that if I can remove the offending email from the mailmessages list then I could continue as normal for the majority of cases, and the remainder can be picked up manually, but I do not know if this is possible or how to do so if it is.

A bit delayed response :slight_smile:

You could use EML to MSG converter from MsgKit

Cheers