Is there an easy way to embed images in email body

hello everyone,

until now, i still don’t see any topic that guides on how to easily embed an image in html email bodies. i honestly believe that this should be a basic activity that is supported in uipath.

there are some posts and 3rd party packages, they are helpful so far, but if a company does not want to use those 3rd party packages, there are no other easy option to perform this.

any new ‘simple and easy’ ideas? :slight_smile:

1 Like

Hi there…

Have you checked these :slight_smile:

How to add image in email body
Embed image in email using Send Outlook Mail Message activity

Regards :slight_smile:

Hi @Twits_Rombaoa
You can use HTML in the body :slight_smile:

Please check this one:

i did try that before, the image is attached but still not showing within the body of my mail :slight_smile:

1 Like

Okay. I will create a sample file. :slight_smile:

1 Like

@Jan_Brian_Despi, hello :slight_smile:
did you manage to find a workaround for this? I can’t :wink:

Did you solve your issue?

@Jan_Brian_Despi Did you can share here your example please?

Hi @Twits_Rombaoa,
Please find a custom activity to embed images in outlook mails:

https://go.uipath.com/component/send-inline-images-in-outlook-email

1 Like

Same here

Hi all,

I found out that if I gave the ContentId the same name as the document without the path, the it worked for me.
Image=“C:\Temp\test.png”
ContentID=“test.png”

will you please share the same it would be helpful

Here you have my example.
Main.xaml (7.6 KB)

Hi,
Image needs to be converted to base64 string before adding it in HTML Body.

Logic :
BaseURL = Convert.ToBase64String(System.IO.File.ReadAllBytes(Image2))

2 Likes

This worked for me perfectly. If anyone needs some tools to encode/decode images for testing purposes you can use Encode Base64 online

The below video has a clear explanation on your question.

Hello @Twits_Rombaoa, @Gamesha.P, @AparnaGP, @Chetan_Gandhi, @Anders, @vandanaYadav, @Sourav_Anand, @carmen, @Jan_Brian_Despi ,

You don’t required any activity for this action. We can send an email with the image in its’ body of the email.

Please refer the below topic, you can get the solution from this Link

Note: Image files should be in main project folder, don’t place in any subfolders or somewhere else.

Hi there, did you test this between different mail servers? ie. Sending from Outlook, but receiving email in Gmail? I have the issue where this does not work no matter what method I have tried. Be careful that these images are only appearing on the same platform you send from.