I have tried using html code.But I am not getting the output.
Welcome to the community.
You can convert the image to base64 string and then embed in HTML body.
string image_path=“physical path of your image”;
byte byes_array = System.IO.File.ReadAllBytes(image_path);
string base64String = Convert.ToBase64String(byes_array);
Thank you
Arif Elahi
Hi @arifelahi I have tried by converting image to base64. But I am not getting the proper output.Do you have any workflow related to add image in the body of a mail?
Sorry i can’t share workflow as of now, But it was working for me.
Please refer to this post How to display Base64 images in HTML - Stack Overflow
It may help you.
Please mark as solution if it helps
Arif Elahi
Is this code work with smtp mail message activity?
Yes, you can write HTML body in smtp mail message activity. You need to select the option IsBodyHtml in properties.
Hi,
Use this methods to add images from a folder through sending an mail
(AttachmentType)(oAttachmentvar)=new Attachment(Imagepath)
oAttachment.ContentId=“imageContent1”
while using send smtp activity you need pass Argument values as your “Imagepath”
find below workflow for References.
SendingImage_mail.xaml (7.6 KB)
Hope this helps.
Regrads,
Neelima.
Hi I tried both Neelima’s and Arifelahi’s method. But when the receiver is a gmail account I am getting the mail output like this
. What may be the reason? If the receiver is an outlook mail, the output is proper.The image in the body of mail won’t work in Gmail. So if you want to place your image in the body then upload it to some online Image sharing portal where you can get the URL of the image and then use the Img src tag in the body of the mail.
Thanks