Define the SMTP Gateway to the Exchange Server

 

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Microsoft Exchange Server 2010 uses an SMTP-to-SMS gateway to send text messaging notifications from an Exchange mailbox to a user's mobile phone. This functionality notifies a user by sending them a text message whenever a new e-mail message is received. An SMTP-to-SMS gateway is required for each mobile phone provider. Several common SMTP-to-SMS gateways are included with Exchange 2010 Service Pack (SP1). These SMTP-to-SMS gateways are stored in an XML file and a copy of that file is included on each Client Access server and each Hub Transport server. If your organization requires an SMTP-to-SMS gateway for a mobile phone provider that isn't included in Exchange 2010 SP1, you can create a customized XML file using the instructions included in this topic.

Creating a Customized SMTP Gateway XML File

The SMTP gateway XML file is located in the Exchange Server\V14\Bin folder. The file name is TextMessagingHostingData-System.xml. In order to create your own customized XML file, must create a second customized XML file named TextMessagingHostingData-Site.xml in the same location on the Client Access servers and the Hub Transport servers in your Exchange organization.

Note

If your Exchange organization includes multiple Client Access servers and Hub Transport servers, you must copy this customized XML file to all of these servers.

As soon as the file has been copied to all applicable servers, the next time your users try to configure SMS notifications in the Exchange Control Panel (ECP), they'll see the new SMTP-to-SMS gateways you have defined.

Note

Because changes to the customized XML file are visible without a service restart, we recommend that you don't edit the customized XML file in the target location. Copy it to another location for editing, and then copy the completed file to the target folder.

SMTP Gateway XML File Format

The name of customized XML file must be TextMessagingHostingData-Site.xml. Three types of information are stored in this file:

  • Country and region information, which is stored in the Regions section of the XML file.

  • SMTP gateway carrier information.

  • SMTP gateway detailed specifications.

Every SMTP gateway requires both a country or region and a carrier. One carrier can have multiple SMTP gateways, but each SMTP gateway can have only one carrier. Each combination of these three types of information must be unique. Therefore, if you define a combination in the customized file that's the same as the combination in the default file, the information in the default file will be overwritten.

Regions Section

The Regions section of the XML file is made up of three pieces of information.

<Regions>
    <Region Iso2="CN">
      <CountryCode>86</CountryCode> 
      <PhoneNumberExample>139 0000 0000</PhoneNumberExample> 
    </Region>
</Regions>

Note

If the custom XML file tries to define the same region as one contained in the default file, the entry in the default file will be overwritten.

Carriers Section

The carrier information section contains the following two pieces of information:

  • ID   This is a 5-digit number that's unique within the default and customized SMTP configuration XML files.

  • Carrier localized name   Each carrier can have multiple names. This is the localized name for the carrier in the local region. You can specify display names for a variety of localities. An English display name should always be specified as a default.

The carriers section of the XML file might look like the following:

<Carriers>
    <Carrier Identity="30344">
        <LocalizedInfo Culture="en">
            <DisplayName>Gold Systems, Inc.</DisplayName> 
        </LocalizedInfo>
    </Carrier>
    <Carrier Identity="30345">
        <LocalizedInfo Culture="en">
            <DisplayName>China Mobile</DisplayName> 
        </LocalizedInfo>
        <LocalizedInfo Culture="zh">
            <DisplayName>中国移动</DisplayName> 
        </LocalizedInfo>
    </Carrier>
</Carriers>

Note

If the XML file contains Unicode text for the localized carrier name, you must save the XML file in a UTF-8 or Unicode encoding format.

Service Section

The service section defines the SMTP gateway specification. Three types of information are included in this section of the XML file.

  • Region ISO   The Region ISO you are specifying must have been previously defined in the Region section of the XML file.

  • Carrier   The Carrier identity must have been previously defined in the Carriers section of the XML file.

  • SMTPToSMSGateway   This section of the file contains the following information:

    • SMTP address   This is the SMTP address for the message to be routed to when an SMS notification is generated. There are two keywords in this field. %c is the country code specified in region section and %n is the local phone number.

    • MessageRendering   This container defines how the message is rendered. It includes several parameters. The Container parameter can have one of two values. If the value is body, then the SMS message content is stored in the message body. If the value is subject, then the SMS message content is stored in the message subject. The Capacity parameter specifies how many characters can be contained in one SMS message. The CodingScheme property of the Capacity parameter can be either GSMDefault, Unicode, or Euc-KR.

An example service section might look like the following.

<Service>
        <RegionIso2>CN</RegionIso2> 
        <CarrierIdentity>30345</CarrierIdentity> 
        <Type>SmtpToSmsGateway</Type> 
        <SmtpToSmsGateway>
            <RecipientAddressing>
                <SmtpAddress>%n@139.com</SmtpAddress> 
            </RecipientAddressing>
            <MessageRendering Container="Body">
                <Capacity CodingScheme="GsmDefault">140</Capacity> 
                <Capacity CodingScheme="Unicode">50</Capacity> 
            </MessageRendering>
        </SmtpToSmsGateway>
    </Service>

For a GSM network, GsmDefault capacity should always be specified, while Unicode is optional. When Unicode is not specified, all Unicode characters will be automatically converted to ? in the system.

For a CDMA network, at least one capacity should be specified.

Note

Typically, the SMTP gateway will use some characters for extra information, such as the from field. Set aside enough buffer when specifying message length for some of this extra information.

XML File Example

This is an example of a complete TextMessagingHostingData-Site.xml file.

<?xml version="1.0" ?> 
<TextMessagingHostingData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Regions>
    <Region Iso2="CN">
      <CountryCode>86</CountryCode> 
      <PhoneNumberExample>139 0000 0000</PhoneNumberExample> 
    </Region>
</Regions>
<Carriers>
    <Carrier Identity="30344">
        <LocalizedInfo Culture="en">
            <DisplayName>Gold Systems, Inc.</DisplayName> 
        </LocalizedInfo>
    </Carrier>
    <Carrier Identity="30345">
        <LocalizedInfo Culture="en">
            <DisplayName>China Mobile</DisplayName> 
        </LocalizedInfo>
        <LocalizedInfo Culture="zh">
            <DisplayName>中国移动</DisplayName> 
        </LocalizedInfo>
    </Carrier>
</Carriers>
<Services>
    <Service>
        <RegionIso2>US</RegionIso2> 
        <CarrierIdentity>30344</CarrierIdentity> 
        <Type>SmtpToSmsGateway</Type> 
        <SmtpToSmsGateway>
            <RecipientAddressing>
                <SmtpAddress>%n@paging.goldsys.com</SmtpAddress> 
            </RecipientAddressing>
            <MessageRendering Container="Body">
                <Capacity CodingScheme="GsmDefault">140</Capacity> 
            </MessageRendering>
        </SmtpToSmsGateway>
    </Service>
    <Service>
        <RegionIso2>CN</RegionIso2> 
        <CarrierIdentity>30345</CarrierIdentity> 
        <Type>SmtpToSmsGateway</Type> 
        <SmtpToSmsGateway>
            <RecipientAddressing>
                <SmtpAddress>%n@139.com</SmtpAddress> 
            </RecipientAddressing>
            <MessageRendering Container="Body">
                <Capacity CodingScheme="GsmDefault">140</Capacity> 
                <Capacity CodingScheme="Unicode">50</Capacity> 
            </MessageRendering>
            </SmtpToSmsGateway>
    </Service>
</Services>
</TextMessagingHostingData>

 © 2010 Microsoft Corporation. All rights reserved.