UiPath has updated their send email activity and now I have to send an email with an attachment using this activity but I am confused as to how to do that.
I tried to mention the location of the file in “C:\Users\A\Downloads\file.format” but that gives me an error related to IEnumerable(Of Resources).
Please guide me on how to send the attachment using this activity.
The error image is beside the activity image.
Hi,
What version of mail pack and Studio do you use?
For now, can you try the following expression?
{LocalResource.FromPath("C:\Users\A\Downloads\file.format")}
Regards,
1 Like
The Attachment field supports IResource as input.
To convert any local drive file to IResource datatype, pass the value like the below.
{LocalResource.FromPath("C:\Users\A\Downloads\file.format")}
1 Like
For a single attachment, this expression can be used and it is working as expected for me. Please check the your end as well.
New List(Of UiPath.Platform.ResourceHandling.IResource) From {
LocalResource.FromPath(in_mailAttachement(0).ToString)
}
1 Like
Welcome to the community
two ways
- Use expression -
{LocalResource.FromPath("C:\Users\A\Downloads\file.format")} - Click on plus near attachment and then select the file as it gives the ui option to select
cheers
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.


