How to send a mail with multiple attachments UiPath

While designing process automation using outlook then you will definitely come across this scenario.

How we can send a mail with multiple attachments or attachments which dynamically changes.

Firstly, make sure you are saving all the required attachments which need to be sent via an email in a specific folder.

With this we can send attachments with different name as well.

Let’s jump into the practical implementation of this task:

Step1: Drag and Drop an Assign activity from activities panel to designer panel and use the code as shown below:

send multiple attachments in a mail

The MailAttachments variable type is array of strings.

Which will hold all the file paths of the attachments that we want to send.

Step2: Drag and Drop send outlook mail message activity and pass the MailAttachments variable as an input to attachmentscollection parameter as shown below:

send multiple attachments in a mail

This will be the final output of the mail if you try the above-mentioned way:

send multiple attachments in a mail

As we want to send a mail with multiple attachments which are different in names and file extensions.

This can be achieved by using the above method if your files are stored in a folder.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *