Sending varied numbers of attachment in Outlook Email

email
attachment

#1

Hi guys, I am working on a flow which sends multiple emails out, with each email attaching the attachments saved in a directory.

I’ve saved all the attachment in a folder path. I am trying to run a “for each” workflow for the invoke method to add attachment to the email. However, I’m not sure what should the “TargetObject” be as shown in the image below:
image

Parameters of the invoke method:
image

Can anyone please help, thanks so much!


#2

Hi @annalyy,

Check this post,


#3

Hey @piyush.2224 you need to setup the smtp for every single attachment .

Regards Abhik .


#4

Thanks @sarathi125

I notice this post is on SMTP but I’m working on outlook email. I tried but the parameter part shows this:
image

I wonder if outlook mail works differently?


#5

@annalyy,

you can iterate using the files information from that directory and send mail activity like this,
AS per my understanding you want to send each file in a separate mails, so I have used System.IO.FileInfo to loop and sending the file’s full name in the attachment action as a parameter.


#6

Thanks @sarathi125

I actually want to send multiple attachments in one email through outlook. How should that work? Thanks!


#7

I am using the workflow below and the file not found exception keeps poping out. However, I’m very sure that the path is correct…any idea? Thanks!!

Main.xaml (12.5 KB)


#8

dynamicattachments.xaml (8.1 KB)

Hi,

check this attached xaml, we have to pass the parameter to the invoke method. pass file path to that parameter