How to put the image as inline in email body

Hello,

I have to send the image as inline in email body.
Right now I am able to send the image as an attachment, but not in email body.
I have done the following :
→ Take screen shot and save it in one file
→ Then I took it in one object
→ I have converted it in Base64 array
→ then took it in one “strbody” variable using this → " "<!DOCTYPE html><html><body><img data-surl='data:image/png;base64,'"+strvar+"'' alt='Smiley face' width='150' height='150'></body></html>""

expression
→ Then I am sending the email but I am not getting the email as an inline. Still I am getting the image as an attachement.

Can someone help me to perform it.

I have to show it to my workplace. :slight_smile:

Regards

1 Like

Have you checked IsBodyHTML @sachinl?

Place the full path of image and try

Hope this would help you
They were facing similar issue as you have now

Cheers @sachinl

Hello @Palaniyappan → I am trying to do it via SMTP, It is obligatory for to do it from SMTP server.

So do you believe this will work in SMTP also, ??

Hello,
I have two follow up questions to this.

  1. It seems that this will work for those using Outlook but not for those using another mail provider. Is there some way to universally embed the images so that no matter what system is used, the images are available?
  2. In the current method I am using, I am putting a link to the file in the body of the email. However, that file gets overwritten each time the process runs. When I look back at old emails that were sent, they all show the current image. Is there a way to paste the images in so that it doesn’t change historical emails?
    Thank you.