Send Inline Images in mail with Send Exchange Mail activity

Hi All,

I am trying to send Inline images with Send Exchange Mail activity but it is not working for me.
I have already gone through all the topics available in the forum but not able to achieve this.
I am getting this error.
image

Please let me know if anyone have the answer.

Thanks!
Anmol

For sending images you can upload it to some image sharing website where you can get the URL of the image and then you can use the URL in your html body of mail.

Hi @anmolk171,

I would suggest to use HTML in the mailBody to embed the image:

string.Format("Dear colleagues, <br><br> Please find the image embedded. <br><br><img src="{0}" ><br><br>Kind regards,<br><br>Your robot<br>", strImagePath,)

and also attach the image using the Attachments Collection of the Send Exchange Mail Message activity.

image

Hope this helps!

Best regards,
Cristian

Thanks guys for the help @hasib08 and @Cristian_Bardas - Unfortunately both the method didn’t workout for me.
If anyone is looking for solution.Here it is:

  1. ByteArray = System.IO.File.ReadAllBytes(Image_Path)
  2. Image_Byte = Convert.ToBase64String(ByteArray)
  3. HTML_Body = <img src=“data:image/jpg;base64 , Image_Byte” alt=“Red dot”

Pass HTML_Body into the mail and it will work.

ByteArray is of type System.Byte and Image_Byte and HTML_Body is of type String.
Hope it will help you.

Thanks

Hi,

understand my requirement which is checking DOB from excel which matches with system date and if found any employee data should send email to respective employee
here I have a need that I should send image in the body of email using random slides from ppt. I have a ppt where I have different templates defined in it. so application should pick random template in the body of email.

It will be helpful if you add your inputs on this requirement as well.

I have attached the sample output- the image should be in the middle of body message. Please send the project if any one tried this requirement!

Hi @anmolk171, could you please share this XAML example?