Gets the length of the binary content of the attachment.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax Public ReadOnly Property Size As Integer
Get
Property Value
Type:
Int32
The length of the binary content of the message attachment in bytes.
Remarks
This property contains the length of the attachment's content in decoded form (after the mail message has already been parsed
and all MIME parts have been decoded from base64, quoted-printable, etc).
Examples This sample loads the message from .EML file and displays the size of each attachment's data.
using MailBee;
using MailBee.Mime;
MailMessage msg = new MailMessage();
msg.LoadMessage(@"C:\Docs\TestMail.eml");
foreach (Attachment attach in msg.Attachments)
{
Console.WriteLine("The size is " + attach.Size.ToString());
}
Imports MailBee
Imports MailBee.Mime
Dim msg As New MailMessage
msg.LoadMessage("C:\Docs\TestMail.eml")
For Each attach As Attachment In msg.Attachments
Console.WriteLine("The size is " & attach.Size.ToString())
Next
See Also