Apparently it does not read the ‘For Each item’ condition when I try to read the extension from the directory. This is what I am doing.
vFolder = the folder path
vDirectory = Directory.GetFiles(vFolder," ",SearchOption.AllDirectories)
For each item in vDirectory
if Path.GetExtension(item) = “.xlsx”
I just figured out that if the size of the attachement is 0 bytes, it does not detect the attachment. I typed “abc” into the .txt file, saved it and mailed it. The bot could then download the .txt. file.
Please let me know what could be the issue here.