Older Excel file attachment is corrupt on StoreToFile

Jun 3, 2014 at 6:12 PM
First off, I have few issues with most emails and attachments that I process with ActiveUp.Net.Mail.Message using pop3 or Imap. However, when downloading and saving an attachment of an older excel file, the file is corrupt and cannot be opened in excel. I have tried saving the file with StoreToFile and also dumping the bytes directly with File.WriteAllBytes(..). Both produce a garbage file. I have verified the attachment is fine by going to any mail client that supports pop3 and downloading the file through the mail client. The email provider is Sonic.net. I have used their web client and outlook connecting with pop3 and in both cases the attachment is fine and I can open and view it. Bottom line, I need a way to download this file and save it with out corruption programmatically.

Thoughts? Is this an encoding issue? Any guessing on what I should try? Happy to send an example file.
Jun 19, 2014 at 3:30 AM
It's your OS, not the SDK lemme guess windows 8?
Jun 29, 2014 at 6:55 PM
The problem is not his OS, it is a bug in MailSystem.NET.

That said, try using MailKit - I think you'll find it works a lot better than MailSystem.NET.