I have to send one .csv attachment and .png attachment to email. I used the below expression but getting the error
Hi,
Which language do you use?
If vb it should be as the following.
Directory.GetFiles(CSVPath,"*.*",SearchOption.AllDirectories).Where(Function(s) s.EndsWith(".csv") OrElse s.EndsWith(".png"))
It might be better to compare case-ignore.
Directory.GetFiles(CSVPath,"*.*",SearchOption.AllDirectories).Where(Function(s) s.ToLower.EndsWith(".csv") OrElse s.ToLower.EndsWith(".png"))
OR
try to recreate your project C# mode.
Regards,