SmtpHostResolved Event
Occurs when the SMTP server name is successully resolved into IP address(es).

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
public event HostResolvedEventHandler HostResolved


Type: MailBeeHostResolvedEventHandler

If the SMTP server name was already specified as an IP address, this event is still raised.

When the POP3 server name is resolved into IP address (if POP-before-SMTP authentication is used), this event is raised as well.

Note Note
No checking if performed on whether the resolved IP address points to the live host.
This sample connects to the SMTP 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.SmtpMail;

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

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

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

See Also