SmtpMessageSubmittedToServer Event
Occurs each time the message is successfully submitted to the SMTP server.

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


Type: MailBee.SmtpMailSmtpMessageSubmittedToServerEventHandler
If the message is sent to multiple SMTP servers (common case in direct send mode where the message is submitted to SMTP MX server of each recipient domain separately), this event is raised for each SMTP server the message was successfully submitted to.
This sample sends a message in direct send mode to 3 recipients on 2 domains. MessageSubmittedToServer event is raised 2 times (for each domain).
using System;
using MailBee;
using MailBee.SmtpMail;

class Sample
    // MessageSubmittedToServer event handler.
    private static void OnMessageSubmittedToServer(object sender,
        SmtpMessageSubmittedToServerEventArgs e)
        Console.WriteLine(e.AcceptedRecipients.ToString() + " accepted");

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

        // Get DNS servers from config file/OS settings.

        // Subscribe to the MessageRecipientSubmitted event.
        mailer.MessageSubmittedToServer +=
            new SmtpMessageSubmittedToServerEventHandler(OnMessageSubmittedToServer);

        // Send a message to 3 recipients on 2 domains.
        mailer.To.AsString = ",,";
        mailer.From.Email = "";
        mailer.Subject = "Test message";
See Also