Pop3LoggedIn Event
Occurs when the component successfully authenticates the user on the server and logs in the user account.

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public event LoggedInEventHandler LoggedIn


Type: MailBeeLoggedInEventHandler
After raising this event, the component will download the mailbox statistics from the mail server (number of messages in the mailbox, and other information as specified by InboxPreloadOptions property setting.
This sample connects to the POP3 server, logs in the user account, and downloads the complete mailbox statistics. The sample demonstrates there is a delay between LoggedIn event occurence and Login(String, String, String, String, AuthenticationMethods, AuthenticationOptions, SaslMethod) method completion, which is the amount of time spent on downloading the mailbox statistics after completion of the authentication process.
using System;
using MailBee;
using MailBee.Pop3Mail;

class Sample
    // LoggedIn event handler.
    private static void OnLoggedIn(object sender, LoggedInEventArgs e)
        Console.WriteLine("Successfully logged in the user account at " +
            (DateTime.Now - DateTime.Today));

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

        // Subscribe to the LoggedIn event.
        pop.LoggedIn += new LoggedInEventHandler(OnLoggedIn);


        // Set "download the complete mailbox statistics" mode to increase the delay 
        // between LoggedIn event and Login method completion 
        pop.InboxPreloadOptions = Pop3InboxPreloadOptions.List | Pop3InboxPreloadOptions.Uidl;

        // Authenticate the user, log in the mailbox, and download the mailbox statistics.
        pop.Login("jdoe", "secret");

        Console.WriteLine("The user account statistics received at " +
            (DateTime.Now - DateTime.Today));

See Also