Edit

Share via


SendItemType Class

Definition

The SendItemType class represents a request to send a message.

public ref class SendItemType : ExchangeWebServices::BaseRequestType
public class SendItemType : ExchangeWebServices.BaseRequestType
Public Class SendItemType
Inherits BaseRequestType
Inheritance
SendItemType

Examples

The following code example shows you how to create a SendItem request by using the SendItemType class.

ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.Credentials = new NetworkCredential("username", "password", "myDomain");
esb.Url = @"https://myServer.myDomain.com/EWS/Exchange.asmx";
// Create the SendItem request.
SendItemType <span class="label">sit</span> = new SendItemType();
<span class="label">sit</span>.ItemIds = new BaseItemIdType[1];

// Create an item ID type and set the message ID and change key.
ItemIdType itemId = new ItemIdType();

// Get the ID and change key from the message that was obtained by using FindItem or CreateItem.
itemId.Id = "AQAtA=";
itemId.ChangeKey = "CQAAAB";

<span class="label">sit</span>.ItemIds[0] = itemId;

// Send the message.
SendItemResponseType siResponse = esb.SendItem(<span class="label">sit</span>);

Remarks

The CreateItem operation sends e-mails and meeting requests to recipients and attendees. The SendItem operation is used when the item has been created and has not yet been sent.

Constructors

SendItemType()

The SendItemType constructor initializes a new instance of the SendItemType class.

Properties

ItemIds

The ItemIds property gets or sets an array of item identifiers that are used to determine the items to try to send. Set this property with an ItemIdType array. This property is required. This is a read/write property.

SavedItemFolderId

The SavedItemFolderId property gets or sets the identity of the folder that contains a saved version of the sent item. This property is set with either a FolderIdType or a DistinguishedFolderIdType. This property is optional. This is a read/write property.

SaveItemToFolder

The SaveItemToFolder property gets or sets a Boolean value that specifies whether a copy of the sent item is saved. This property is required. This is a read/write property.

Applies to