Indicates if the message was received completely.
true if the message is complete; otherwise, false.
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).
This sample gets the headers of the message and the first 10 lines of its body message from the POP3 server and determines whatever the message is entire, partial or incomplete. It will be partial if it's a composite message split into smaller ones, or it will be entire if the entire message body fits into 10 lines, or it will be incomplete if its body does not fit into 10 lines which have been downloaded.
[C#] 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)"); } } }
[Visual Basic] Imports System Imports MailBee Imports MailBee.Mime Imports MailBee.Pop3Mail Module Sample Sub Main(ByVal args As String()) ' Download the first mail message from the specified POP3 account. Dim msg As MailMessage = Pop3.QuickDownloadMessage("mail.domain.com", "jdoe", "password", 1, 10) ' Check whatever the message is entire, partial, ' or it was received incompletely. If msg.IsEntire Then Console.WriteLine("The message was completely received") ElseIf msg.PartCount > 1 Then Console.WriteLine("The message is partial (part index is " & _ msg.PartIndex.ToString & ")") Else Console.WriteLine("The message was not completely received " & _ "(the body is larger than 10 lines downloaded)") End If End Sub End Module
MailMessage Class | MailBee.Mime Namespace | PartIndex | PartCount | AppendPartialMessage