Save the images from mail Body

Hi All,

I am facing issues with saving the images from the mail body (not from attachments), I tried to save the image as html and then open the link through mail, was not successful.

Thanks in advance

Pavan H

Great question. It looks like UiPath retrieves emails as a collection of MailMessage objects. I have noticed from past experience using vbscript with outlook that items in the email body are actually attachments with special flags. I would double-check that they’re not showing up in the attachments list just to be sure.

See this talking about how to embed images in email bodies:

And this is the documentation for MailMessages which will also be useful:

1 Like

Yeah, I tested this on some of my emails that have embedded images, and they all were in Attachments. As a test, I outputted the name on one:
if(item.Attachments.Count>0, item.Attachments(0).Name,"")


Thank you so much guys,

I have got a easy way of getting it done as suggested by @ddpadil, just to use a save attachment activity and it will save the embedded image as well.

Thanks for help guys.

Pavan H


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