cancel
Showing results for 
Search instead for 
Did you mean: 

Embedding image in html body

ManojPatidar
Level 3

Hi team,

I am trying to send a mail via Outlook.

I am embedding image in the html body.

Image is stored in my local machine.

When I am sending mail everything works fine expect the embedded image, which other person is not seeing.

I am using <img src="file path"> to embed image.

Please let me know if anyone worked with this or have any idea.

Thanks and Regards 



------------------------------
Manoj Patidar
------------------------------
1 BEST ANSWER

Best Answers

flavio.lara
Level 5

Hello Manoj.

My suggestion is to embed the image after converting it to BASE64.

<p><img id="YourImageID"  src="data:image/png;base64, AddYourBase64StringHere" alt="Image Alternative info">
</p>
So your code will not depend of accessing your filesystem anymore.
Regards,
Flavio



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------

View answer in original post

8 REPLIES 8

flavio.lara
Level 5

Hello Manoj.

My suggestion is to embed the image after converting it to BASE64.

<p><img id="YourImageID"  src="data:image/png;base64, AddYourBase64StringHere" alt="Image Alternative info">
</p>
So your code will not depend of accessing your filesystem anymore.
Regards,
Flavio



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------

LeonardoSQueiroz
Level 10

Hi Manoj Patidar

A workaround is to add the image as an attachment to Outlook VBO and use <img src=""cid:image.jpg"">

Regards,


------------------------------
Leonardo Soares
RPA Developer
------------------------------
Leonardo Soares RPA Developer América/Brazil

harish.m
Level 12

Hi Manoj Patidor,

As suggested by Leonardo Soares, you need to attach that image and use image tag. i used in the past for both outlook  VBO as Well as SMTP.

O



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------

----------------------- If I answered your query. Please mark it as the "Best Answer" [FirstName] [LastName] [Designation] [JobTitle] [City] [State] [Phone]

Hi Flavio Lara,

Can you help me with conversion of image into BASE64 string. 

Thanks and regards.



------------------------------
Manoj Patidar
------------------------------

Hi Leonardo,

If i attached image into Outlook VBO, will it shows as an attachment into the email? like normal attachment used in our day to day life. 

Or just help to embed image into the html body?

Thanks and Regards.



------------------------------
Manoj Patidar
------------------------------

Hi Manoj,

If I recall correctly when ever it is unable to embed  because of some syntaxes mistake  in html it will include in the attachment otherwise it will not 



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
----------------------- If I answered your query. Please mark it as the "Best Answer" [FirstName] [LastName] [Designation] [JobTitle] [City] [State] [Phone]

Hi Manoj,

To convert the image to base 64 you can utilize the digital exchange VBO. Below is the link for the same.
https://digitalexchange.blueprism.com/dx/entry/3439/solution/base64encoder-2



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
----------------------- If I answered your query. Please mark it as the "Best Answer" [FirstName] [LastName] [Designation] [JobTitle] [City] [State] [Phone]

Hi Manoj.

You can use a VBO from DX like:

Option 1: Blue Prism Digital Exchange

Option 2: Blue Prism Digital Exchange



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------