IMAP: How I get attachment file size?

Oct 20, 2014 at 4:40 AM
Hi

MailMessage mg;
mg = Client.GetMessage(1);
mg.AttachmentFiles.????

Please help me, need example.
Coordinator
Oct 21, 2014 at 12:20 AM
Hi.

Use foreach statement to get each file.
And summary it.

regards.
Oct 24, 2014 at 9:01 AM
No.
I want get size of first attachment file (not summary whole files)
Coordinator
Oct 25, 2014 at 3:07 PM
Hi.

So, You can use First extension method(LINQ) and you can get first attachment file.
And access BodyData.Lentgh property as file size.