Send email with .msg template


I have several email templates with .msg file format. In the .msg file, there are some placeholders that need to be replaced with variable value during the automation.

Is it possible to read the .msg and replace placeholder with correct variables? Then I also need to save the .msg file and send it out as email attachment. I am using Outlook 2016 FYI.

Would it possible to achieve the above process with UiPath? If yes, could you let me know how to do it?

Thank you so much!


Yes. It is possible. Follow the below steps to achieve the intended functionality.

Step 1: Double-Click the .msg file to open with a default application Outlook
Step 2: In the “More Move Actions” menu -> select Edit Message
Step 3: Replace the placeholders in the message
Step 4: Click Save button
Step 5: Close the outlook message
Step 6: Send Outlook message with the saved .msg file as attachment.

Karthik Byggari

1 Like

Hi Karthik Byggari,

Thanks a lot but I am still a bit confused. I attached an example .msg template here, could you show me in the xaml how to handle it from step 1? assume I know the file path of .msg file and all variable values are known. I need to replace the placeholders in {} in both the body and also the subject . In the same time, I would also like to keep the image and formatting of text.

I really appreciate it if you could show me how to handle this via UiPath. Thank you very much in advance! (83.6 KB)