Ews.AddAttachmentAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Ews.dll (version 7.0.9119)
AddAttachmentAsync(EwsItemId, String, Object)
Begins asynchronous AddAttachment operation. Adds a file as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, string filePath, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
String | filePath | Path to a file to read attachment data from. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, String, String, Object)
Begins asynchronous AddAttachment operation. Adds a file as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, string filePath, string contentType, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
String | filePath | Path to a file to read attachment data from. |
String | contentType | Content type of an attachment. For predefined strings see MediaTypeNames subclasses's constants. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, String, Stream, Object)
Begins asynchronous AddAttachment operation. Adds a stream as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, string name, Stream input, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
String | name | Display name of new attachment. |
Stream | input | A stream to read attachment data from. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, String, Stream, String, Object)
Begins asynchronous AddAttachment operation. Adds a stream as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, string name, Stream input, string contentType, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
String | name | Display name of new attachment. |
Stream | input | A stream to read attachment data from. |
String | contentType | Content type of an attachment. For predefined strings see MediaTypeNames subclasses's constants. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, MimeMessage, Object)
Begins asynchronous AddAttachment operation. Adds a MIME message as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, MimeMessage message, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
MimeMessage | message | A MIME message to attach. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, MailMessage, Object)
Begins asynchronous AddAttachment operation. Add a mail message as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, MailMessage mail, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
MailMessage | A Mail message to attach. |
|
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |
AddAttachmentAsync(EwsItemId, String, Byte[], Object)
Begins asynchronous AddAttachment operation. Add a MIME raw data as new attachment to an exchange item.
Declaration
public Task<EwsAttachmentId> AddAttachmentAsync(EwsItemId itemId, string name, byte[] mimeContent, object state = null)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
String | name | Display name of new attachment. |
Byte[] | mimeContent | Raw MIME data. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<EwsAttachmentId> | EwsAttachmentId of the new attachment. |