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.
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?
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.