Scrrenshots not appearing in HTML mail

Hi,
I have a few processes that creates a user and takes a screenshot and saves to the “Create Client User” folder.
Once all the screenshots have been taken throughout the process, I send an email with all these screenshots amongst other information.
I create the HTML email with “Create HTML Content”, which inserts the images from file when run:
“Create Client User\clientUserCreation.png”
When run on my local machine, the pictures DO appear in the email.
Once published and run from another machine, the screenshots are definately created if I check in File Explorer, but the pictures do NOT appear in the email, stating:
“The linked image cannot be displayed, The file may have been moved, renamed, or deleted. Verify that the link points to the correct file and location.”
Why won’t the images display?

Hey! Welcome to community!

It’s better to check the files already there in folder or not. If files exists it’s better to Delete those files or Create folder and move these files to that folder!

The images have to display from the folder!

There might be the duplicate images. or check the mails once.

Whether you can able to view the images which bot fails to take screenshot and download to the folder!

Check it in debug mode if this is run perfectly in Debug mode it have to run from orchestrator as well…

Check these points and let me know

Regards,
NaNi

Hello @Luke_McKinley
Can you write that email body to a text file and verify the location it has generated.

Also, Create Client User, is that a folder in your project?

Hi NaNi,
Thanks for your quick response.
I deleted the previous screenshots, and the process created new images succesfully, but they still did not appear in the email.
It is like the Create HTML Content does not find them, even though it does when run on my local machine

Hi!

try like this:

<embed src="Path" style="position:absolute; left: 0; top: 0;" width="100%" height="100%" >

Regards,
NaNi

How does one put this into the “Create HTML Content”?
I inserted the line:

but when the email arrived, that is what was visible in the email:

instead of the picture

Ok, that is not working for me, I did insert that line into the Create HTML Content, but the email just printed that line out.
I couldn’t get your line to come up in my reply, it just disappears

Ok, I see what is happening here.
I wrote the output of the Create HTML activity to a text file, and when inserting an image, it literally uses the whole file location, ie:

src=“file:///C:/Users/frigm/Documents/UiPath/ImageloadProcess/Client/clientUserDash.png” width=“250”

instead of just Client/clientUserDash.png

So the problem lies in the fact that the remote machine houses the image file in a totally differrent location, so it won’t find the image.

I will have to manually create the HTML file without the Create HTML Content activity for it to find the file properly, and then insert the images using your method

we would add the picture ass attachment or we would embed is (base64 String) inside and can use it for embedding the CreateHTML Content

Hi,

Yeah, I figured I can use “new FileInfo(“Client\clientUserDash.png”).FullName” to return the full file name, which I can then use in creating the HTML file.
It returns “C:\Users\frigm\Documents\UiPath\ImageloadProcess\Client\clientUserDash.png”

No longer using the Create HTML Content activity. I will just create the HTML in a text file and read it to use in the body of the Send Mail Message.

Not sure if this is the right way, but it seems to be working for me.
If I don’t come right, I will be sure to look into the base64 thing, thanks

Peter,

I eventually went with the Base64 solution, as it seemed the only way to win at the end of the day.

The reason I was putting it off is because I just didn’t understand the whole Base64 thing, but it didn’t take me long to figure it out.

Thanks for your help

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.