MailMessageIsEntire Property |
Namespace: MailBee.Mime
If the e-mail message is not entire, the developer can use PartCount property to examine whether the e-mail message is composite (i.e. actually consists of several messages which must be joined to get the complete message). To get the index of the part the message represents, use PartIndex property.
However, the message may be incomplete even if it's a normal message. For instance, if you downloaded only a message header from the mail server, the message will be incomplete too (you'll need to download the entire message to get it completely).
using System; using MailBee; using MailBee.Mime; using MailBee.Pop3Mail; class Sample { static void Main(string[] args) { // Download the first mail message from the specified POP3 account. MailMessage msg = Pop3.QuickDownloadMessage("mail.domain.com", "jdoe", "password", 1, 10); // Check whatever the message is entire, partial, // or it was received incompletely. if (msg.IsEntire) { Console.WriteLine("The message was completely received"); } else if (msg.PartCount > 1) { Console.WriteLine(@"The message is partial (part index is " + msg.PartIndex + ")"); } else { Console.WriteLine(@"The message was not completely received (the body is larger than 10 lines downloaded)"); } } }