This project is read-only.

the attachment.Download method delete the attachment content

May 4, 2016 at 4:22 PM

this is the issue I'm facing with (

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.

May 4, 2016 at 4:33 PM
Edited May 4, 2016 at 5: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 

                ' 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

please help me :)