I am trying to get the multiple attachment files name which has .xlsx or .xls extention without saving the files into folder. Can anyone please suggest how to achive this?
I am trying with below method which gives me output but with entire path instead of name.
In your code only change the argument type to System.Net.Mail.Attachment and then inside for each you can provide “item.Name” for there you will get all the names one by one