Why it is not possible to see embedded images in an email using the UiPath solution?
Issue Overview: In most email clients, it is possible to send embedded images in an email. A common question is how to do this using UiPath. This guide will explain a few different ways that this can be done.
Technical Overview: This guide will cover three ways of embedding an image in a UiPath email:
- Approach with Send SMTP Mail Message activity
- Approach with Use Gmail and Send Email activities
- Approach with Use Outlook 365 and Send Email activities
Approach with Send SMTP Mail Message activity (with this approach, is possible that some emails, will not see the embedded images):
- Create a project
- Add in the project the header.png and footer.png files
- Add a Send SMTP Mail Message activity
- In Attach Files for the Send SMTP Mail Message activity, specify the files that being used .
Direction: In
Type: String
Value: "header.png"
and
Direction: In
Type: String
Value: "footer.png"
- Configure Send SMTP Mail Message activity
Body: "
Hi UiPathRPA developer,
What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Subject: "Test mail with image"
Port: 587 (in case of using the Gmail SMTP server)
Server: "smtp.gmail.com"
Email: "NAME.SURNAME@gmail.com"
Password: "YOUR_SECURED_PASSWORD"
IsBodyHtml: Yes
SecureConnection: Auto
To: "NAME.SURNAME@DOMAIN.com"
From: "NAME.SURNAME@gmail.com"
Name: "Name of the sender Test from Studio"
Results in Outlook:
Approach with Use Gmail and Send Email activities (In this case, there will be no issues with seeing the images in one device, and not seeing in others):
- In Send Email activity, select HTML -> Open Editor -> Edit your content similar to a Word document
- If required, insert also the Attachments files in the email (but it is not mandatory).
Example results:
Approach with Use Outlook 365 and Send Email activities (In this case, there will be no issues with seeing the images in one device, and not seeing in others):
In Send Email activity, select HTML -> Open Editor -> Edit your content similar to a Word document
If required, insert also the Attachments files in the email (but is not mandatory).
Example results: