Pop3MessageDownloaded Event
Occurs when a message was downloaded from the server.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public event Pop3MessageDownloadedEventHandler MessageDownloaded

Value

Type: MailBee.Pop3MailPop3MessageDownloadedEventHandler
Remarks

If only message headers were requested for download (e.g. DownloadMessageHeaders(Int32, Int32, Int32) method was called), this event is raised when a message header is downloaded.

When multiple messages are downloaded, this event is raised for every message (or message header) which was downloaded.

Examples
This sample downloads headers of the last 10 messages in the inbox. For each downloaded header, the corresponding status message is displayed.
using System;
using MailBee;
using MailBee.Pop3Mail;
using MailBee.Mime;

class Sample
{
    // MessageDownloaded event handler.
    private static void OnMessageDownloaded(object sender,
        Pop3MessageDownloadedEventArgs e)
    {
        Console.WriteLine("The header of the message #" + e.MessageNumber +
            " has been downloaded");
    }

    // The actual code.
    static void Main(string[] args)
    {
        Pop3 pop = new Pop3();

        // Subscribe to the MessageDownloaded event.
        pop.MessageDownloaded +=
            new Pop3MessageDownloadedEventHandler(OnMessageDownloaded);

        pop.Connect("mail.domain.com");
        pop.Login("jdoe", "secret");

        // Download headers of the last 10 messages in the inbox.
        MailMessageCollection msgs = pop.DownloadMessageHeaders(pop.InboxMessageCount - 9, 10);

        pop.Disconnect();
    }
}
See Also