Sending Mail with Multiple Attachment

Hi i want to send mail with multiple attachment, Please help me with this thank you.

1 Like

@zellec

Use SEND OUTLOOK MAIL MESSAGE activity , In the Attach Files ,attach your attachments

image

2 Likes

@Sob thank you for the info. but i need to send multiple attachment.

@zellec Follow below link

1 Like

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)

2 Likes

@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.

1 Like

Thanks for the reply i just found a solution.

Main.xaml (14.3 KB)
this also u can try.

2 Likes

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:

  1. Create a variable ‘multiAttach’ of type string array.
  2. Assign multiAttach = Directory.GetFiles(“folder path”)
  3. In Send outlook mail messages, instead of attaching files use AttachmentsCollections from the properties and pass ‘multiAttach’ variable.(Please see below image)

Multiple%20Attachments

Done!!!

17 Likes

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 ?

1 Like