Path Information for Email Attachments

Question:

GetMailAttachFilename gives me the name of the attachment but not the path. This is the same as using the GetAttachmentFilename method of the email object. When I read the email I need to process the contents of the attached file(s). To do this I need to get at the physical file. If I've only got the filename VB will look in the application path for the file and obviously it won't be there.

When I was trying to use the MAPI controls with VB I could get a physical location including the path. This let me take the file and iterate through it line by line.

Answer:

Path information is typically not included in the filename of an email attachment. (You can check this by adding file attachments in Outlook and then verifying that the path was not included in the received email.) When Chilkat Mail reads an email, it does not automatically save attachments to disk. The attachments are immediately available in-memory, and if you so desire, your application can save them to disk by calling SaveAllAttachments or SaveAttachedFile(index).