System.Net.Mail.SmtpClient.SendMessageCallback C# (CSharp) Method

SendMessageCallback() private method

private SendMessageCallback ( IAsyncResult result ) : void
result IAsyncResult
return void
        private void SendMessageCallback(IAsyncResult result)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this);
            try
            {
                _message.EndSend(result);
                // If some recipients failed but not others, throw AFTER sending the message.
                Complete(_failedRecipientException, result);
            }
            catch (Exception e)
            {
                Complete(e, result);
            }
            finally
            {
                if (NetEventSource.IsEnabled) NetEventSource.Exit(this);
            }
        }