Ews.AddAttachment Method
Namespace: Rebex.Net
Assembly: Rebex.Ews.dll (version 7.0.9083)
AddAttachment(EwsItemId, String)
Adds a file as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, string filePath)
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. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, String, String)
Adds a file as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, string filePath, string contentType)
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. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, String, Stream)
Adds a stream as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, string name, Stream input)
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. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, String, Stream, String)
Adds a stream as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, string name, Stream input, string contentType)
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. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, MimeMessage)
Adds a MIME message as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, MimeMessage message)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
MimeMessage | message | A MIME message to attach. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, MailMessage)
Add a mail message as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, MailMessage mail)
Parameters
Type | Name | Description |
---|---|---|
EwsItemId | itemId | ID of an item to which to add the attachment. |
MailMessage | A Mail message to attach. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |
AddAttachment(EwsItemId, String, Byte[])
Add a MIME raw data as new attachment to an exchange item.
Declaration
public EwsAttachmentId AddAttachment(EwsItemId itemId, string name, byte[] mimeContent)
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. |
Returns
Type | Description |
---|---|
EwsAttachmentId | EwsAttachmentId of the new attachment. |