Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

Ews.SendMessageAsync Method

Namespace: Rebex.Net
Assembly: Rebex.Ews.dll (version 7.0.9119)

SendMessageAsync(MailMessage, Object)

Begins asynchronous SendMessage operation. Sends a mail message and saves it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(MailMessage message, object state = null)
Parameters
Type Name Description
MailMessage message

Message to send.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(MailMessage, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a mail message.

Declaration
public Task SendMessageAsync(MailMessage message, EwsFolderId saveFolderId, object state = null)
Parameters
Type Name Description
MailMessage message

Message to send.

EwsFolderId saveFolderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it at the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(MailMessage, EwsFolderId, Nullable<DateTime>, Object)

Begins asynchronous SendMessage operation. Sends a mail message.

Declaration
public Task SendMessageAsync(MailMessage message, EwsFolderId saveFolderId, DateTime? sendTime, object state = null)
Parameters
Type Name Description
MailMessage message

Message to send.

EwsFolderId saveFolderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it at the Exchange server.

Nullable<DateTime> sendTime

Date and time when to send the message (also known as delay sending). If the value is smaller than the current time, the message is sent immediately.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(MimeMessage, Object)

Begins asynchronous SendMessage operation. Sends a MIME message and saves it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(MimeMessage message, object state = null)
Parameters
Type Name Description
MimeMessage message

Mime message to send.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(MimeMessage, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a MIME message.

Declaration
public Task SendMessageAsync(MimeMessage message, EwsFolderId saveFolderId, object state = null)
Parameters
Type Name Description
MimeMessage message

Mime message to send.

EwsFolderId saveFolderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it an the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(MimeMessage, EwsFolderId, Nullable<DateTime>, Object)

Begins asynchronous SendMessage operation. Sends a MIME message.

Declaration
public Task SendMessageAsync(MimeMessage message, EwsFolderId saveFolderId, DateTime? sendTime, object state = null)
Parameters
Type Name Description
MimeMessage message

Mime message to send.

EwsFolderId saveFolderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it an the Exchange server.

Nullable<DateTime> sendTime

Date and time when to send the message (also known as delay sending). If the value is smaller than the current time, the message is sent immediately.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments and stores it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(string to, string subject, string body, object state = null)
Parameters
Type Name Description
String to

Comma-separated list of message recipients.

String subject

The subject of the message.

String body

The text body of the message.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, EwsMessageBody, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments and stores it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(string to, string subject, EwsMessageBody body, object state = null)
Parameters
Type Name Description
String to

Comma-separated list of message recipients.

String subject

The subject of the message.

EwsMessageBody body

The body of the message.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments.

Declaration
public Task SendMessageAsync(string to, string subject, string body, EwsFolderId folderId, object state = null)
Parameters
Type Name Description
String to

Comma-separated list of message recipients.

String subject

The subject of the message.

String body

The text body of the message.

EwsFolderId folderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it in the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, EwsMessageBody, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments.

Declaration
public Task SendMessageAsync(string to, string subject, EwsMessageBody body, EwsFolderId folderId, object state = null)
Parameters
Type Name Description
String to

Comma-separated list of message recipients.

String subject

The subject of the message.

EwsMessageBody body

The body of the message.

EwsFolderId folderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it in the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, String, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments and stores it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(string from, string to, string subject, string body, object state = null)
Parameters
Type Name Description
String from

Message sender.

String to

Comma-separated list of message recipients.

String subject

The subject of the message.

String body

The text body of the message.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, EwsMessageBody, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments and stores it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(string from, string to, string subject, EwsMessageBody body, object state = null)
Parameters
Type Name Description
String from

Message sender.

String to

Comma-separated list of message recipients.

String subject

The subject of the message.

EwsMessageBody body

The text body of the message.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, String, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments.

Declaration
public Task SendMessageAsync(string from, string to, string subject, string body, EwsFolderId folderId, object state = null)
Parameters
Type Name Description
String from

Message sender.

String to

Comma-separated list of message recipients.

String subject

The subject of the message.

String body

The text body of the message.

EwsFolderId folderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it an the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(String, String, String, EwsMessageBody, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a message composed from the arguments.

Declaration
public Task SendMessageAsync(string from, string to, string subject, EwsMessageBody body, EwsFolderId folderId, object state = null)
Parameters
Type Name Description
String from

Message sender.

String to

Comma-separated list of message recipients.

String subject

The subject of the message.

EwsMessageBody body

The text body of the message.

EwsFolderId folderId

ID of a folder to which to save the sent message. Specify null (Nothing in VB.NET) to send the message without saving it an the Exchange server.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task

SendMessageAsync(EwsItemId, Object)

Begins asynchronous SendMessage operation. Sends a message stored in exchange server and moves it to the 'Sent Items' folder.

Declaration
public Task SendMessageAsync(EwsItemId itemId, object state = null)
Parameters
Type Name Description
EwsItemId itemId

ID of a message to send.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task
Remarks

This operation needs ChangeKey to be set to the latest value.

SendMessageAsync(EwsItemId, EwsFolderId, Object)

Begins asynchronous SendMessage operation. Sends a message stored in exchange server.

Declaration
public Task SendMessageAsync(EwsItemId itemId, EwsFolderId saveFolderId, object state = null)
Parameters
Type Name Description
EwsItemId itemId

ID of a message to send.

EwsFolderId saveFolderId

ID of a folder to which to move the sent message. Specify null (Nothing in VB.NET) to discard (permanently delete) the message.

Object state

An optional user-provided object that identifies this particular asynchronous operation.

Returns
Type Description
Task
Remarks

This operation needs ChangeKey to be set to the latest value. This operation doesn't work on some Exchange versions (e.g. Exchange 2010) if the message was already sent.

In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies