Embed image in email using Send Outlook Mail Message activity

email
outlook
activities
p_known

#1

Hi, I’m trying to embed an image (.png) into my email content (html codes). These are some methods that I have tried and the respective outcomes:

1. Use img src html tag with the local path of the image.
The image is not visible when sent to other computers as they do not have access to the image that is pointing to my local path.
tmp

2. Use attachment content id.
I referred to this thread and tried out something similar as proposed by @Suchi3190 but the image is not visible.
https://forum.uipath.com/t/how-to-add-the-images-in-smtp-mail-body/3054/4
tmp

3. Convert image in base64 and use data uri to show the image in my email.
It appears that for Outlook versions of 2007 and above, base64 image cannot be displayed.
https://www.campaignmonitor.com/blog/email-marketing/2013/02/embedded-images-in-html-email/
tmp

Attached is my source code.
Test Email Embed Image.zip (16.6 KB)

Appreciate your help!


Extend activity eg : Outlooksend Mail
#2

#2 works for me. What is your outlook version? Perhaps security issue?

image


#3

I’m using Outlook 2016, send to another computer with Outlook 2013. May I know what is your Outlook version?


#4

Thanks to @vvaidya I managed to narrow down the possibilities and identified the issue. Tried #2 again and sent email to a pc with Outlook 2016 and it worked.

I suspect Outlook 2013 has a slightly different way of handling embedded images, the image does not show in the mail but was sent as an attachment instead.


#5

I’m using outlook 2013, and not able to embed an image in mail body.
Please give the solution if anybody have.


#6

Yes, the only problem is in outlook 2013. I checked.

Could anybody able to find out this problem/setting in outlook 2013 or not. Please let me know if your outlook 2013 is able to show image in body.


#7

Hi,
I’m getting the following error. Can anyone help me to achieve this.And I want to know why am I getting this…?template error


#8

Hi All,
I could able to send image in mail body through Outlook 2016.But in 2013, It’s not working.![error|690x141]error

Can anyone fixed this issue.


#9

Can you give us more details on what are you trying to do? Maybe attach the workflow, with only the mail activities part that are failing.


#10

For which outlook version exactly method 2 will work. I am facing the same issue.


#11

Hello Vvaidya, Which outlook version you are using exactly. I am using Outlook 2013 but i am also facing same issue just like above mentioned


#12

tried #2 but I am getting the error like other people using. my outlook version is 2016.

used the #2 file just changed the smtp to outlook message but its not sending image as body.

Thanks in advance

Thanks,
Dill


#13

What exactly is the problem Dill?


#14

Hi, I am trying to add an image into email body using HTML via giving source of the file{file path store in my laptop}. But when i am sending this email to someone the image dosen’t appear into email body and a Empty box with red cross mark saying" Either the file has been moved or deleted or renamed" . I am using the HTML code: Img SRC=‘C:\Users\Dill\Pictures\Huawei-logo-1024x768.png’ alt=‘Logo’ height=‘42’ width=‘42’


#15

send me the project please - wf+image too (without the user and password of course)


How to send the mail using sendoutlook mail with dynamic content?
#16

Hi

PFA,

Send email.xaml (9.6 KB)
Photo


#17

Hi,

Please follow the steps given below-

  • Design the template in html including the image source and save it as .txt.
  • Read the same in UiPath Studio and save the output in string.
  • Give this string in send mail body with formatting the string as per requirement, and this will do the work.

I have attached the sample workflow.

Thanks
Vikash
email.zip (7.0 KB)


Put color to the text
#18

HI Man, It worked. Thanks a lot.


#19

didn’t work


#20

I have tried too its not working. Due to Image you are putting into email body its saved locally into your Pc so when you send it to someone else it will never shows up.
Unless you are using a image from online server like Google or yahoo etc. You just need to paste the url of that image into html body and send to it to someone and only then it will shows up.