Hi i want to send mail with multiple attachment, Please help me with this thank you.
@Sob thank you for the info. but i need to send multiple attachment.
@zellec Follow below link
HI,
option 1- you can directly give paths in the arguments of send mail activity.
option 2- read that directory and run the for loop, then we can send as many attachment we want. In the argument pass the file name that is your “item”+ remaining path.
Hope it will workMain.xaml (9.5 KB)
@rahul599756 i need to send all files in one message.
then go for invoke method inside for loop and pass that invoke method output into send mail argument. we can send from that. This will work.
Thanks for the reply i just found a solution.
Main.xaml (14.3 KB)
this also u can try.
Hello Rahul, why are we using the type in invoke method as null ?
thanks in advance.
Thanks Rahul…The provided code is working fine.
But when I received the mail I am unable to find Email subject and body contain, what I have provided. Please your code and let us know how it should sent in email.
Thanks
Please follow the below steps:
- Create a variable ‘multiAttach’ of type string array.
- Assign multiAttach = Directory.GetFiles(“folder path”)
- In Send outlook mail messages, instead of attaching files use AttachmentsCollections from the properties and pass ‘multiAttach’ variable.(Please see below image)
Done!!!
Hi
try to use assign
mailMessage.body = “xxxxxx”
mailMessage.subject = “xxxxxx”
This works like charm, thanks its saved my manual works for adding one by one image files inside the folder
Thanks Tauseef1. Best solution for the issue.
hey, i try this method on SMTP activities, but it seems dont work … did i miss something ?
Hi Friends
In Sending SMTP Mail you have to update the version Uipath.mail.Activities 1.9.5 then it will show you attachmentsCollection then you can attach multiple files.
You can use a variable System.Collections.Generic.IEnumerable <System.String> and with an assign add the path of the files for sending mail. Something like this: AttachmentsCollection = {“Path file 1”, “Path file 2”}
Thank You! It’Work
I want to send multiple attachments to multiple email ids (eg: (invoice 1 and invoice 3) to mail id 1 and (invoice 2 and invoice 5 ) to mail id 2 and so on . Can you please help me with it ??