سؤال

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!

هل كانت مفيدة؟

المحلول

Use attachment.Body.

foreach(var attachment in message.FindAllAttachments())
{
    long byteSize = attachment.Body.Length;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top