System.Net.Mail.SendMailAsyncResult.Send C# (CSharp) Method

Send() private method

private Send ( ) : void
return void
        internal void Send()
        {
            SendMailFrom();
        }

Usage Example

Example #1
0
        internal IAsyncResult BeginSendMail(MailAddress sender, MailAddressCollection recipients,
                                            string deliveryNotify, bool allowUnicode, AsyncCallback callback, object state)
        {
            if (sender == null)
            {
                throw new ArgumentNullException(nameof(sender));
            }

            if (recipients == null)
            {
                throw new ArgumentNullException(nameof(recipients));
            }

            if (GlobalLog.IsEnabled && recipients.Count > 0)
            {
                GlobalLog.Assert("SmtpTransport::BeginSendMail()|recepients.Count <= 0");
            }

            SendMailAsyncResult result = new SendMailAsyncResult(_connection, sender, recipients,
                                                                 allowUnicode, _connection.DSNEnabled ? deliveryNotify : null,
                                                                 callback, state);

            result.Send();
            return(result);
        }
All Usage Examples Of System.Net.Mail.SendMailAsyncResult::Send