Save Outlook Mail Message

Hi everyone, maybe someone can help me!

I’m trying to save a mail message in UiPath (v.2016.2.6232) using the “Save Mail Message” activity.

So I get some mails from a folder using “Get Outlook Mail Messages” and iterate on the result list. For each mail, I save it with “Save Mail Message” activity and give it FilePath and MailMessage property. The mail is properly saved at the good place but when I’m trying to open it, I get an exception : “Can not open file “xxx”. The file does not exist, you do not have permission to open it or it is open in another program. Right-click the folder that contains the file, and then click Properties to check your permissions on the folder.”

I tried to do it manually and it works as expected.

Can someone please help me on that ?

Thanks in advance.

Regards.

Masiré

2 Likes

what format are you using to save the email?

The format is the standard one. After using the activity I obtain an “.msg” file.

save it as .eml, we don`t support anything else.

5 Likes

Thanks. It’s working good :slight_smile:

what is difference between eml and msg extensions. we are not able to view the date time when using eml extensions

Hey @lawanyaram

Difference b/w .Msg and .EML

REGARDS…!!
AKSH

2 Likes

Had the same problem few weeks ago and client insist on having date displayed.

I was able to fix this issue by converting the date property to ‘longdate’ format. Then date will be displayed when opened in outlook.

Hope that helps

1 Like

thanks for the info. Can you please share with me a sample workflow for the same

Hello;

This is easy and straight forward. Follow this steps:

  • Using the assign activity, set your date property as below:

  • item.Headers(“Date”) = convert.ToDateTime(item.Headers(“Date”)).ToString(“dd MMM yyyy H:mm”).

  • Save email.

Now you have your time displayed on outlook. Hope that help and let me know of any issues

5 Likes

thanks

i tried this approach. But still facing the same issuetest.xaml (7.2 KB)

test.xaml (8.2 KB)
It worked now :slight_smile: there was an issue in my syntax. Thanks

Hello;

Change your forloop argument to system.net.mail.mailmessageimage

Hope that helps (:slight_smile:

Hello!

I am saving a message so I can upload to a particular software as a file. One problem - Uipath doesn’t support .msg, and the software doesn’t support .eml.

:frowning:

Does anyone know a quick way I could convert the file?

UIPath supports .eml only
Is there any business necessity to save as msg. Do you see any issue with .eml

Yeah - the software the business is using will only accept .msg files as uploads.
I ended up writing a short script that opens the file and saves it using Outlook, which converts it to the correct format.

It seems to be working for now.

Hi, I too have the problem when saving the outlook mail files. it shows the following error “The given path’s format is not supported”. please advise.

Further the .msg file is required to open in MS outlook for future use!!!

Hi Gabriel , I‘m wondering how should I do if I need to save a outlook mail with picture information on that ?

It seems that use ‘get outlook mail message’/‘save mail message’ activity can only save mail without picture information?

That image is an attachment in the mail?