cancel
Showing results for 
Search instead for 
Did you mean: 

How do I send an image in an email body?

HumzaQureshi
Level 2

I've attached the image "Return Mail Image Header.png" as an attachment to the email. However, I want to show this image in the actual body of the email. I tried using CID in the body like this, but with no success. How can I accomplish this? Is there any other way to have inline images without using CID? Would using a Base64 string be better?

20981.png

By the way, I've already taken a look at this thread, which is 4 years old and doesn't work in 2023. I hope somebody can send a CURRENT working solution.

https://community.blueprism.com/communities/community-home/digestviewer/viewthread?GroupId=145&MID=2253&CommunityKey=3743dbaa-6766-4a4d-b7ed-9a98b6b1dd01



------------------------------
Humza Qureshi
------------------------------
3 REPLIES 3

steven.boggs
Staff
Staff

Hi Humza,

To add an image into an email body (instead of an attachment), you could insert an image in the body of an email using HTML tags to point to an image hosted online. Using a Data Item, with data type as "text", add the HTML code which makes it possible to send an email with an image included in the body of the message.



------------------------------
Steve Boggs
Senior Product Support Engineer
Blue Prism
Austin, TX
------------------------------

daniel_cg
Level 2

Just share my available action below:

  1. save the image in local drive, like: d:\img\img1.jpg
  2. replace the "\" to "/" for the image path, like: d:/img/img1.jpg
  3. set the path in the html element, like:  <img src='file:d:/img/img1.jpg'>

note: key word is "file:" if save file in local drive

And hope it would help you, thank you.



------------------------------
Daniel Cheng
------------------------------

Hello,

Try using this expression after converting the image to base 64:

<p><img id="ImageID"  src="data:image/png;base64, Base64Code"> </p>

Regards,



------------------------------
Leonardo Soares
RPA Developer Tech Leader
Bridge Consulting
América/Brazil
------------------------------

Leonardo Soares RPA Developer América/Brazil