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

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public event LoggedInEventHandler LoggedIn

Value

Type: MailBeeLoggedInEventHandler
Remarks
This event is raised only as a result of ESMTP authentication (performed by Login method). Successful completion of POP-before-SMTP authentication does not cause this event to be raised.
Examples
This sample connects to the SMTP server, and then authenticates the user on the server.
using System;
using MailBee;
using MailBee.SmtpMail;

class Sample
{
    // LoggedIn event handler.
    private static void OnLoggedIn(object sender, LoggedInEventArgs e)
    {
        Console.WriteLine("Successfully authenticated on the SMTP server");
    }

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

        // Specify SMTP server and enable ESMTP authentication.
        // Note, depending on your SMTP server settings, either jdoe or jdoe@domain.com 
        // should be used as user account name.
        mailer.SmtpServers.Add("smtp.domain.com", "jdoe@domain.com", "secret");

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

        mailer.Connect();
        mailer.Hello();
        mailer.Login();
        mailer.Disconnect();
    }
}
See Also