Quantcast
Channel: ImapX 2
Viewing all articles
Browse latest Browse all 1952

Created Unassigned: System.FormatException on downloading attachments and embedded resources [2754]

$
0
0
When attempting to download attachments (and embedded resources), I receive an System.FormatException saying on the FileData property of the attachment:

```
System.FormatException
"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."
```

My code looks like this:

```
var messages = Client.Folders["INBOX"].Search("UNSEEN");
foreach(var message in messages)
{
...
foreach(var attachment in message.attachments)
{
attachment.Download();
}
}
```

Before downloading, every attachment shows the file name and size. It simply fails when executing the download method. I'm using hMailServer, .NET 4.5 and IMapX version 2.0.0.18.

Viewing all articles
Browse latest Browse all 1952

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>