How to paste image into email body?

Hi all,

I am currently trying to paste an image into my email body.
The way I retrieve my image is through data scraping from a webpage.
This is the data of the retrieved images:

Then, I save it into a variable, type UiPath.Core.Image
image

How could I use the so that the variable will paste an image inside of my email body?

Thanks

HI @SRoyi

Please check the below thread:

Regards

1 Like

@SRoyi

check the reference

Is one image as an embedded Image to place within the email body?
OR
are all images to add as attachments?

Only 1 Image will be added

ok, perfect

When we dont want to use the img src url directly.

we can do
grafik
ImageAsB64String =

Convert.ToBase64String(File.ReadAllBytes(myLocalResource.LocalPath))

OR

with HttpClient Download

myHttpClient = new HttpClient()
grafik
myBytes | Byte Array =

myHttpClient.GetByteArrayAsync(strURL).Result

ImageAsB64String2 =
Convert.ToBase64String(myBytes)

Then we configure a HTML template as described here:
grafik

E.g.:

<P><IMG src="data:image/png;base64,{{YourMapVariable}}"></P>
1 Like

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