How to sent files through outlook present on folder

I want to read and sent files through emails that are present in particular folder. Store files present in variable and use that variable in attachment in outlook

@sshitol

you can use directory.Getfiles("Folderpath")

this will give the files in an array and those can be sent in attachment

cheers

it is not sending all attachment, sending only single attachment

@sshitol

did you use the same?

also it would return array of values …if there is single file it will send single only

show some screenshots to understand the issue

cheers


pls see this
variable tp is type of string

@sshitol

are you using tp as input to send mail?

if yes then you would get only one

you need to use directory.getfiles("folderpath") in the attachment collection field as shown in the screenshot to add all files

cheers

Hi @sshitol ,

If you are using below activities - you can follow my code. It is working as expected

Few points to consider:

Assign value for FolderFiles is Directory.GetFiles(“C:\Users****\Check”)

FolderFiles variable is array of string

Attachment collection - we need to set the above variable