Pop3MessageDownloadedEventArgsDownloadedMessage Property
Gets or sets the mail message which had been downloaded.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public MailMessage DownloadedMessage { get; set; }

Property Value

Type: MailMessage
A reference to the mail message which had been just downloaded, or a null reference (Nothing in Visual Basic) if there had been no message data in the server response.
Remarks

When this property value is a null reference, this usually means the mail server replied with a negative response instead of a message data. For instance, this may happen on attempt to download a messsage which had already been marked as deleted during the current POP3 session. In this case, the corresponding method of Pop3 class which had been used to download message(s) will throw an exception after the method has finished receiving data from the POP3 server.

The developer can also manually set this property value to a null reference to avoid inclusion of this message into the resulting MailMessageCollection. For methods returning a single message (such as DownloadEntireMessage(Int32)), the result will be a null reference.

Setting this property to a null reference is also useful for downloading very large number of messages at once (when they won't fit in memory). In this case, the developer can save each message to database/disk in MessageDownloaded event handler and then set DownloadedMessage to a null reference to free the resources. This is efficient and memory conservative appoach.

See Also