Compartilhar via


SPMobileMessageWebService.SendMessage Method

Sends a single Office Mobile Service (OMS) message.

Namespace:  Microsoft.SharePoint.MobileMessage
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function SendMessage ( _
    messageXml As String _
) As SPMobileMessageDeliveryReport
'Usage
Dim instance As SPMobileMessageWebService
Dim messageXml As String
Dim returnValue As SPMobileMessageDeliveryReport

returnValue = instance.SendMessage(messageXml)
public SPMobileMessageDeliveryReport SendMessage(
    string messageXml
)

Parameters

  • messageXml
    Type: System.String

    An xmsData element that constitutes the message.

Return Value

Type: Microsoft.SharePoint.MobileMessage.SPMobileMessageDeliveryReport
A report on the success or failure of the attempt to send the message.

Remarks

SendMessage(String) creates a proxy for the Web service and invokes the OMS-defined DeliverXms Web method.

Examples

The following is an example of an xmsData element that is passed to the method.

<?xml version="1.0" encoding="utf-8"?>
<xmsData client="Microsoft Office Outlook 12.0" xmlns = "https://schemas.microsoft.com/office/Outlook/2006/OMS">
   <user>
      <userId>Bob</userId>
      <password>*Hy%,eG</password>
      <replyPhone>13801391350</replyPhone>
      <customData/>
   </user>
   <xmsHead>
      <scheduled>2009-04-20T14:20:00Z</scheduled>
      <requiredService>SMS_SENDER</requiredService>
      <to>
         <recipient>19999999999</recipient>
         <recipient>19999999998</recipient>
      </to>
   </xmsHead>
   <xmsBody format="SMS">
      <content contentType="text/plain" contentId="Att0.txt@AB1B43B2B0594564B94EF7ABB12B49BA"
            contentLocation="1.txt">I’m late. Start without me.</content>     
   </xmsBody>
</xmsData>

See Also

Reference

SPMobileMessageWebService Class

SPMobileMessageWebService Members

Microsoft.SharePoint.MobileMessage Namespace