Question

I use openpop .net library to retrieve mails from mail server with POP3. All works fine but I can't retrieve size of each attachment of mail. I founded GetMessageSize(i) but this size is sum of all attachments.

Then the question is how I can retrieve size of each attachment.

Can anybody help me? Thanks!

Was it helpful?

Solution

Use attachment.Body.

foreach(var attachment in message.FindAllAttachments())
{
    long byteSize = attachment.Body.Length;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top