Share via


Exchange 2007 Provider::CreateSMTPDomain

This method creates the domain(s) for a hosted customer.

Arguments

Input Arguments Required Description

<name>

Yes

This parameter specifies a unique name for the accepted domain object.

<domainName>

Yes

This parameter specifies the Simple Mail Transfer Protocol (SMTP) domain to be established as an accepted domain. Wildcard character can be used to specify all subdomains of a given domain, as shown in the following example: *.contoso.com. However, wildcard characters cannot be embed, as shown in the following example: domain.*.contoso.com. The domain name string may not contain more than 256 characters.

<preferredDomainController>

Yes

The domain controller to use for Active Directory actions.

<domainType>

No

This parameter specifies the type of accepted domain to be configured. In an authoritative domain, messages are delivered to a recipient that has a domain account in your Exchange organization. In an internal relay domain, messages are relayed to a server that is outside your Exchange organization, but still under the authority of your company or IT department. Use the internal relay domain if you want to treat the messages to this domain as internal messages. In an external relay domain, messages are relayed to an e-mail server, outside your organization, which you do not control. The default value is Authoritative. Enum

  • Authoritative

  • InternalRelay

  • ExternalRelay

Remarks

Rollback Method: DeleteSMTPDomain

Use CreateSMTPDomain to create a new accepted domain in your organization. An accepted domain is any SMTP namespace for which an Exchange organization sends and receives e-mail.

Accepted domains include those for which the Exchange organization is authoritative. An Exchange organization is authoritative when it handles mail delivery for recipients in the accepted domain.

Accepted domains also include domains for which the Exchange organization receives mail and then relays to an e-mail server that is outside the Active Directory forest for delivery to the recipient.

Security

The caller must be at least a member of role: OrgCreators.

Sample Code

Example XML Request

<request> 
  <data> 
    <!--The domain controller to use for Active Directory actions.--> 
    <preferredDomainController>AD01.Fabrikam.Com</preferredDomainController> 
    <!--This parameter specifies the SMTP domain to be established as an accepted domain.  Wildcard character can be used to specify all subdomains of a given domain, as shown in the following example:   *.contoso.com.   However, wildcard characters cannot be embed, as shown in the following example:   domain.*.contoso.com.   The domain name string may not contain more than 256 characters.--> 
    <domainName>AlpineSkiHouse.com</domainName> 
    <!--This parameter specifies a unique name for the accepted domain object.--> 
    <name>AlpineSkiHouse.com</name> 
    <!--Specifies the type of accepted domain to be configured.  In an authoritative domain, messages are delivered to a recipient that has a domain account in your Exchange organization. In an internal relay domain, messages are relayed to a server that is outside your Exchange organization, but still under the authority of your company or IT department. Use the internal relay domain if you want to treat the messages to this domain as internal messages. In an external relay domain, messages are relayed to an e-mail server, outside your organization, which you do not control.  The default value is Authoritative.--> 
    <domainType>InternalRelay</domainType> 
  </data> 
  <procedure> 
    <execute namespace="Exchange 2007 Provider" procedure="CreateSMTPDomain" impersonate="1"> 
      <before source="data" sourcePath="preferredDomainController" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="domainName" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="name" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="domainType" destination="executeData" mode="move" /> 
      <after source="executeData" destination="data" mode="merge" /> 
    </execute> 
  </procedure> 
</request>

Applies To

Exchange 2007 Provider Namespace for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

See also

Tasks

Managed Email 2007::DeleteSMTPDomain
Hosted Email 2007::DeleteSMTPDomain
Hosted Email 2007::CreateConsumerVanityDomain
Hosted Email 2007::GetOrganizationDomains