MimePartIsComplete Property
Indicates whether the MIME part of the message was received completely.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public bool IsComplete { get; }

Property Value

Type: Boolean
true if the MIME part was received completely; otherwise, false.

If the message was received partially, this property may return false for some MIME parts of the message.

MailBee tests if the MIME part is complete by checking if the closing boundary was found. This, however, works for multi-part messages only. If the message consists of a single part and does not include any boundaries, it's not possible to determine if the part was received completely. However, in this case you can check MailMessage.SizeOnServer property. If its value is larger than MailMessage.Size, the message was incompletely received from the mail server.

This sample loads the message from file and checks if all MIME parts of this message were received entirely.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

// The actual code (put it into a method of your class).
MailMessage msg = new MailMessage();
bool allPartsAreComplete = true;
foreach (MimePart part in msg.MimePartTree.GetAllParts())
    if (!part.IsComplete)
        allPartsAreComplete = false;
if (allPartsAreComplete)
    Console.WriteLine("allPartsAreComplete == true");
    Console.WriteLine("allPartsAreComplete == false");
See Also