Partager via


SendItemType Class

The SendItemType class represents a request to send a message.

Namespace: ExchangeWebServices
Assembly: EWS (in ews.dll)

Syntax

'Declaration
<SerializableAttribute> _
<DebuggerStepThroughAttribute> _
<XmlTypeAttribute(Namespace:="https://schemas.microsoft.com/exchange/services/2006/messages")> _
<DesignerCategoryAttribute("code")> _
<GeneratedCodeAttribute("wsdl", "2.0.50727.42")> _
Public Class SendItemType
    Inherits BaseRequestType
[SerializableAttribute] 
[DebuggerStepThroughAttribute] 
[XmlTypeAttribute(Namespace="https://schemas.microsoft.com/exchange/services/2006/messages")] 
[DesignerCategoryAttribute("code")] 
[GeneratedCodeAttribute("wsdl", "2.0.50727.42")] 
public class SendItemType : BaseRequestType
[SerializableAttribute] 
[DebuggerStepThroughAttribute] 
[XmlTypeAttribute(Namespace=L"https://schemas.microsoft.com/exchange/services/2006/messages")] 
[DesignerCategoryAttribute(L"code")] 
[GeneratedCodeAttribute(L"wsdl", L"2.0.50727.42")] 
public ref class SendItemType : public BaseRequestType
/** @attribute SerializableAttribute() */ 
/** @attribute DebuggerStepThroughAttribute() */ 
/** @attribute XmlTypeAttribute(Namespace="https://schemas.microsoft.com/exchange/services/2006/messages") */ 
/** @attribute DesignerCategoryAttribute("code") */ 
/** @attribute GeneratedCodeAttribute("wsdl", "2.0.50727.42") */ 
public class SendItemType extends BaseRequestType
SerializableAttribute 
DebuggerStepThroughAttribute 
XmlTypeAttribute(Namespace="https://schemas.microsoft.com/exchange/services/2006/messages") 
DesignerCategoryAttribute("code") 
GeneratedCodeAttribute("wsdl", "2.0.50727.42") 
public class SendItemType extends BaseRequestType

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.

Inheritance Hierarchy

System.Object
   ExchangeWebServices.BaseRequestType
    ExchangeWebServices.SendItemType

Example

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 sit = new SendItemType();
sit.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";

sit.ItemIds[0] = itemId;

// Send the message.
SendItemResponseType siResponse = esb.SendItem(sit);

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Longhorn, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2)