SmtpClient.SendAsync

SendAsync(string, string, string, string)

Creates and sends the specified message.

public Task SendAsync(string from, string recipients, string subject, string body)
ParameterTypeDescription
fromStringA String that contains the address of message sender.
recipientsStringA String that contains the address of recipients.
subjectStringA subject of message.
bodyStringA body of message.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(MailMessage)

Send the specified message.

public Task SendAsync(MailMessage message)
ParameterTypeDescription
messageMailMessageThe MailMessage that represents an email-message.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(params MailMessage[])

Send the specified message.

public Task SendAsync(params MailMessage[] messages)
ParameterTypeDescription
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(MailMessageCollection)

Send the specified message collection.

public Task SendAsync(MailMessageCollection messages)
ParameterTypeDescription
messagesMailMessageCollectionThe collection of messages.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IEnumerable<MailMessage>)

Send the specified messages.

public Task SendAsync(IEnumerable<MailMessage> messages)
ParameterTypeDescription
messagesIEnumerable`1The IEnumerator that supports a message iteration.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, string, string, string, string)

Creates and sends the specified message.

public Task SendAsync(IConnection connection, string from, string recipients, string subject, 
    string body)
ParameterTypeDescription
connectionIConnectionConnection to a server
fromStringA String that contains the address of message sender.
recipientsStringA String that contains the address of recipients.
subjectStringA subject of message.
bodyStringA body of message.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, MailMessage)

Send the specified message.

public Task SendAsync(IConnection connection, MailMessage message)
ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageThe MailMessage that represents an email-message.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, params MailMessage[])

Send the specified message.

public Task SendAsync(IConnection connection, params MailMessage[] messages)
ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, MailMessageCollection)

Send the specified message collection.

public Task SendAsync(IConnection connection, MailMessageCollection messages)
ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessageCollectionThe collection of messages.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, IEnumerable<MailMessage>)

Send the specified messages.

public Task SendAsync(IConnection connection, IEnumerable<MailMessage> messages)
ParameterTypeDescription
connectionIConnectionConnection to a server
messagesIEnumerable`1The IEnumerator that supports a message iteration.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(string, string, string, string, CancellationToken)

Creates and sends the specified message.

public Task SendAsync(string from, string recipients, string subject, string body, 
    CancellationToken token)
ParameterTypeDescription
fromStringA String that contains the address of message sender.
recipientsStringA String that contains the address of recipients.
subjectStringA subject of message.
bodyStringA body of message.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(MailMessage, CancellationToken)

Send the specified message.

public Task SendAsync(MailMessage message, CancellationToken token)
ParameterTypeDescription
messageMailMessageThe MailMessage that represents an email-message.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(CancellationToken, params MailMessage[])

Send the specified message.

public Task SendAsync(CancellationToken token, params MailMessage[] messages)
ParameterTypeDescription
tokenCancellationTokenPropagates notification that operations should be canceled.
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(MailMessageCollection, CancellationToken)

Send the specified message collection.

public Task SendAsync(MailMessageCollection messages, CancellationToken token)
ParameterTypeDescription
messagesMailMessageCollectionThe collection of messages.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IEnumerable<MailMessage>, CancellationToken)

Send the specified messages.

public Task SendAsync(IEnumerable<MailMessage> messages, CancellationToken token)
ParameterTypeDescription
messagesIEnumerable`1The IEnumerator that supports a message iteration.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, string, string, string, string, CancellationToken)

Creates and sends the specified message.

public Task SendAsync(IConnection connection, string from, string recipients, string subject, 
    string body, CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
fromStringA String that contains the address of message sender.
recipientsStringA String that contains the address of recipients.
subjectStringA subject of message.
bodyStringA body of message.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, MailMessage, CancellationToken)

Send the specified message.

public Task SendAsync(IConnection connection, MailMessage message, CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageThe MailMessage that represents an email-message.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, CancellationToken, params MailMessage[])

Send the specified message.

public Task SendAsync(IConnection connection, CancellationToken token, 
    params MailMessage[] messages)
ParameterTypeDescription
connectionIConnectionConnection to a server
tokenCancellationTokenPropagates notification that operations should be canceled.
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, MailMessageCollection, CancellationToken)

Send the specified message collection.

public Task SendAsync(IConnection connection, MailMessageCollection messages, 
    CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessageCollectionThe collection of messages.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(IConnection, IEnumerable<MailMessage>, CancellationToken)

Send the specified messages.

public Task SendAsync(IConnection connection, IEnumerable<MailMessage> messages, 
    CancellationToken token)
ParameterTypeDescription
connectionIConnectionConnection to a server
messagesIEnumerable`1The IEnumerator that supports a message iteration.
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

Task object, with delegate for this operation

See Also


SendAsync(SmtpSend)

public Task SendAsync(SmtpSend parameters)

See Also