I need to get the filenames of an e-mail’s attachments (to store in a data store), once finished I want to save the attachments.
To do this I’ve loop through the attachments and called email.GetAttachmentFilename(index)
then I call email.SaveAllAttachments(directory).
The problem is that GetAttachmentFilename returns the TRUE filename of the attached file (i.e. superman.gif), whereas SaveAllAttachments (or SaveAttachedFile) saves the file as with a random string inserted into it (i.e. superman_3B0A.gif).
- Can I get SaveAllAttachments (or SaveAttachedFile) to save the file without the random string inserted?
- Is there a method to get the filename SaveAttachedFile will use before SaveAttachedFile is called?