langsem
(Langsem)
August 20, 2020, 6:27am
1
Hello! I have a bunch of folders, 2 of the folders named “a” and “B” has some images and a pdf file. I want to perform a loop that takes all the pdf files in each of those folders and sends it with a email. Any idea ?
hasib08
(Motiwala Hasib)
August 20, 2020, 6:42am
2
> srcPath = "D:/ Mail_addaress /current_date"
> srcFiles <Array Of Strings> = System.IO.Directory.GetFiles(srcPath, "*.pdf")
Refer This post
oh ok.
So you can use Directory.GetFiles() to get all files in that folder, whether it’s one file or not, it will still give you a list of files. But, you can hardcode the index as 0 if you only want to do the first one it finds.
I don’t recommend using local locations for data storage, unless it’s strictly for attended. But, I’ll use your path as a variable. Example shown below:
srcPath = "D:/ Mail_addaress /current_date"
srcFiles <Array Of Strings> = System.IO.Directory.GetFiles(srcPath, "*…
Hey @piyush.2224
You are asking about “Smtp send mail Activity”?
If it is so you can send multiple or even single attachment using mail collection of attachments.
For Further Assistance, Find an attachment sample and let me know in case of any doubt.
sample_smtp_mail_attachement.zip (8.4 KB)
Regards…!!
Aksh