Having problems when receiving the photo in the middle of the mail body from Outlook activity

I need to send an outlook mail with a photo inside the body. The photo is uploaded properly while sending the mail.
But while receiving the photo is not displayed.
For Example:
Hello,
…blah blah blah
Thank you
{In this field I need to place the logo of the Organization}
contact no:9589XXXXXX
Address: ABC
Website:www.example.com
@Palaniyappan @kumar.varun2 @schwarzp @Divyashreem @lakshman
I have tried all the solutions in forums, Even though I have not got the logo while receiving the photo in the middle of the mail body from Outlook activity. Anyone knows how to achieve this, Please help me with this.
Thanks in Advance

I’m not sure you have tried this approach, if not give it a try. While sending an email, use Normal Image Tag, mark isHtml property and finally pass the image path in the attachments as an in_argument. Hope this will works!

Hi @Gokul001
You can use “Send inline image” activity (Package name - UiPathTeam.OutlookInlineImage.Activities) . Pass the image path and add a placeholder in your email body input parameter as to where exactly you want the image to appear in your email body. Please refer the below screenshot for better understanding:

image

image

Thanks buddy. It’s worked.

@Gokul001

Have you tried to design a template in HTML? Also don’t forget to enable IsHtml property

Hope this may help you

Thanks

Hey buddy @sukannyajamadar
That issue is solved using “Send inline image”.

  1. But the image is not displayed on the Gmail website.
  2. And I need to attach some of the document to the mail.
    How to achieve this, Please help me with this.

Hi @Gokul001
In the properties tab there is a input parameter to provide file path for attachments. Please refer below screenshot :
image
image

Hey buddy @sukannyajamadar
Thank you for this solution.

  1. But the image is not displayed on the Gmail website.
    How to achieve this, Can you please provide a pointer feedback

Can you share a screencapture of how the image looks?

Hey buddy @sukannyajamadar
1.Sure, I will update the image.
images

2.This how the image appears on the Gmail website. Have a look at it.
Gamil

How to achieve this, Can you please provide a pointer feedback.
Thanks in advance

Can you share your email Body content format?
DId you use HTML tags to identify the image source?

Hey buddy @Divyashreem

  1. I used to create an Html content activity to insert an image in it.

  2. I shared my email body and workflow for your reference
    Main
    How to achieve this, Can you please provide a pointer feedback.

Hi @Gokul001

Please find a sample test code which converts the image to be attached into binary(base64) format and attaches it in email body.
TestSequence.xaml (8.0 KB)
Hi @Gokul001
Please make sure to use html tags in your email body, else this solution will not work

imgByte =Convert.ToBase64String(System.IO.File.ReadAllBytes(strFilepath))
strEmailBody =“<img src = ““data:image/png;base64,”+imgByte+””“width=”“+”“1000"”+““height=””+““1000"”+”“/>”

Can you try these?

1 Like

Hey buddy @sukannyajamadar @Divyashreem

  1. I tried to solved based on the solution given. But i’m not getting the image on the Gmail website. Have a look at it.

email

How to achieve this, Can you please provide a pointer feedback

Have you attached the file path of your image in the attachment?

Hey buddy @sukannyajamadar
Yes, I attached but still not working

  1. In the outlook the image appears.
  2. But on the Gmail website, it disappeared. Have a look at it…

emailimage

I tried to send the email email manually and image is not appearing. Can you try sending the email manually and test it once

Hey buddy @sukannyajamadar
I will check and update it shortly