Weird thing !
By retrieving dozens of mails, sometimes the attachment is corrupted !
an additional header that does not belong to the file is on top of the file:
```
* 41 EXISTS
<xml>......</xml>
```
I tried Base64 or UTF8 encoding, same problem!
Any Idea ?
Thanks
Comments: ** Comment from web user: sliver **
By retrieving dozens of mails, sometimes the attachment is corrupted !
an additional header that does not belong to the file is on top of the file:
```
* 41 EXISTS
<xml>......</xml>
```
I tried Base64 or UTF8 encoding, same problem!
Any Idea ?
Thanks
Comments: ** Comment from web user: sliver **
Hi there,
I've the fix for that, would you like to integrate? Please explain how to proceed ?
It comes from the filtering when appending data in the method ProcessCommandResult(string data),
the one is efficiently filtering with some "FETCH" form:
```
if(data.StartsWith("*") && data.Contains("FETCH"))
data = CommandStartRex.Replace(data, "");
```
but filters are missing for '* EXISTS ...' and ' FETCH ... FLAGS'.
```
if(data.StartsWith("*") && data.Contains("EXISTS"))
....
if(data.StartsWith("*") && data.Contains("FETCH") && data.Contains("FLAGS"))
....
```
Regards.