the attachment.Download method delete the attachment content

May 4, 2016 at 3:22 PM
Hello,

this is the issue I'm facing with (2.0.0.18)

my message has 2 attachments. I can see the message and the attachments [0] and [1].

the attachment [1] is a XML file (att.FileSize = 1025)

After performing the download method, the FileSize becomes 0, so I cannot access to the file:
GetString(att.FileData) returns a zero length string and
Save(<path>, <filename>) saves a zero length file..

any advice ? Please it is urgent.

thanks
francesco
May 4, 2016 at 3:33 PM
Edited May 4, 2016 at 4:05 PM
same happens with the attachment [0]

sample code (VB)
    For Each att As ImapX.Attachment In m.Attachments

                ' before the download, FileSize > 0 
                att.Download()

                ' now, FileSize = 0

                att.Save("c:\_myfolder", att.FileName)    ' save an empty file
                contentString = System.Text.Encoding.Default.GetString(att.FileData)   ' return an empty string

    Next
please help me :)
francesco