Sending messages with embedded images

 

This example shows the use of the package RpaBrasil.Mail,Activities which makes it possible to send embedded images in the body of the email.

In the Manage Packages tool, install and save the RpaBrasil.Mail.Activities package.

The package has the following activity:

  • Send Outlook Mail With Embedded Images- Sends embedded images in the email body via Outlook.
  • Send SMTP Mail With Embedded Images– Sends embedded images in the email body via SMTP client.

  

Sending Outlook message with embedded images

Once the package is installed to your project, follow these steps:

  1. Add the activity to the workflow.

 

  1. Set properties values:

 

  • HTML Body- Enter the HTML text for the email body. The img src tag must contain its value in the following format:

 

cid:XXXX, where XXXX is the CID for the image, in this example two images will be inserted, see: "<body> <img src = 'cid:img1'> <br> <img src = 'cid:img2'> </body> "

 

  • EmbeddedCollection- Enter a dictionary where the keys are the CID for the image and the values are the file names. See the following example: 

New Dictionary(Of String, String)() From { {"img1", "C:\Temp\Image1.png"}, {"img2", "C:\Temp\Image2.png"} }

  

  1. The other properties are the same as the UiPath Send Outlook Email Activities.

 

Sending SMTP message with embedded images

For sending a SMTP E-mail message use the Send SMTP Mail with Embedded Images Activity.

Set properties like before:

The other properties are the same as in Send SMTP Mail from UiPath.

 

Comentários (1) -

  • Renato boa noite,

    Faça um tutorial recebendo um e-mail com outlook e baixando anexos.

    Obrigado

Comentar