ImapHostResolved Event
Occurs when the IMAP4 server name is successfully resolved into IP address(es).

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public event HostResolvedEventHandler HostResolved

Value

Type: MailBeeHostResolvedEventHandler
Remarks
If the IMAP4 server name (serverName parameter of Connect(String, Int32, Socket, EndPoint) method) was already specified as an IP address, this event is still raised.
Note Note
No checking if performed on whether the resolved IP address points to the live host.
Examples
This sample connects to the IMAP4 server host and prints all the IP addresses of this host into console. Most hosts, however, have only one IP address assigned.
using System;
using MailBee;
using MailBee.ImapMail;

class Sample
{
    // HostResolved event handler.
    private static void OnHostResolved(object sender, HostResolvedEventArgs e)
    {
        foreach (System.Net.IPAddress ip in e.RemoteHost.AddressList)
        {
            Console.WriteLine(ip.ToString());
        }
    }

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

        // Subscribe to the HostResolved event.
        imp.HostResolved += new HostResolvedEventHandler(OnHostResolved);

        imp.Connect("imap.company.com");
        imp.Disconnect();
    }
}
See Also