I am adding send email scenario where I need to attach 3 attachments.Out of 3 , 1 will be always there in folder.
Using o365 we get 2 options to add attachment, and it accepts it as a string only.
Attachments - FileArr(0) and FileArr(1)
Attachments Collection - here I am giving file which is fixed available// this is the output report I am generting , it wil be always there even if there is SE or BE …in transactions
but there can be possibility that FileArr(0) or FileArr(1) not available in folder or both not available or only 1 available. if 2 BE then o file , if 1 BE then 1 file…
I am adding send email in END state of RE framework.
How do I check ? I get obj ref error, or file missing error
as a solution I am doing below:
I am counting the files in folder.
count is a Int
then, using switch case
Expression: int_FileCount
Default : No files , send email w/o attachment with body informing no files downloaded
1- add , FileArr(0) as an attachment
2- add, FileArr(1) as an attachment
Will this approach work ? due to some reason I am unable to test
I also have to add 1 file which is in different folder , so shall I concatenate the path ? in Attachments Collection ?what if folder has no file at all System.IO.directory.GetFiles(“FolderPath”) will this work?
For now I have added below:
as a solution I am doing below:
I am counting the files in folder.
count is a Int
then, using switch case
Expression: int_FileCount
Default : 0- No files , send email w/o attachment with body informing no files downloaded
1- add , FileArr(0) as an attachment
2- add, FileArr(1) as an attachment
Will this approach work ? due to some reason I am unable to test
Using append item to list…so if directory.getfiles return any then item gets added to returned list else item gets added to the empty list…both the ways list of items is created