Could anyone please tell me where I am going wrong.
I am trying to automate, automatic email sending on Employee birthday. Following is what I am doing
Reading the excel sheet and retrieving the employee info.
Accessing the local folder and picking random image from it and embedding it between the content.
Sending the email using SMTP.
In step 2), I am storing the image url inside the variable “randomImage”. When I print this url, I am getting the proper path like, “C:\Users\Namratha\Documents\UiPath\BirthdayMailAutomation\Docs\Birthday3.jpg”
But when I used this inside the html content, it gives the broken image.
Please find the attached html content which I am using for SMTP mail message. IsHtmlBody is also checked.
You can’t directly embed image in the body of the html using <img src=""/> because image is saved in your local PC.
you have to use some .Net Code to embed images or you have to host image somewhere on the internet then you can give URL of the hosted images in the <img src=""/>. This will work.
you can host images in google drive or any web server.
@Namratha_Nayak ,did you got solution for it? same problem I have and i am unable to send/attach image in mail body.if anybody have solution can you please help. Thanks in advance