Creating draft email and saving as .msg

Hi, so I am trying to create a draft email and then save it to a folder where the business users have access (meaning I don’t want to save the draft in my Outlook).

I have been able to create my email using the steps described here, however once the email draft is saved I then get the following message when trying to open the file. Both reasons for the error they suggest are wrong.

We can’t open ‘<>’. It’s possible the file is open, or you don’t have permission to open it.

I’ve seen some posts about saving emails that suggest using the file format .eml however this does not fit my needs as the email gets saved as an email rather than a draft i.e. can not be quickly edited and sent on.

So how do I save my mail message that I have built so that I then open it as a draft?

Any advice is much appreciated!

Try to save it as draft and then save it. You can delete it after saving as .msg file.

1 Like

Can you expand on what you mean by saving it as draft and then saving it? And what are you deleting afterwards?

Could you please provide the steps you follow right now to do this?

I initialise a mailmessage variable, assign a body, subject, recipient and attachment. I then use the save mail message activity to save it to a folder as a .msg or .eml file.
.eml does not work for me because it is saved as the email been sent. The fields cannot be edited and the email sent once opened - it would have be forwarded or replied to.
.msg does not work for me because i cannot seem to open the file afterwards. It gives the error I described in this initial post.

1 Like

Hi

I did exactly what you showed within your flowchart, i was able to get the outlook file but when I try to open, it says it is already opened within another program?

Hi,
Install Uipath.Mail.activities package and use "save outlook mail message " activity.

It works! But can we save .msg object directly to a local folder using Save Mail activity instead of going through this workaround steps? When i tried to do that, it prompt this error message when i tired to open it.

Hello Everyone,

Did you found any solutions?