Share via


Exchange 2007 Provider::MailEnableContact

This method Mail-enables an existing contact.

Arguments

Input Arguments Required Description

<preferredDomainController>

Yes

The domain controller to use for Active Directory actions.

<path>

Yes

The Lightweight directory access protocol (LDAP) path of the contact object.

<externalEmailAddress>

Yes

This parameter specifies the target e-mail address.

<primarySmtpAddress>

Yes

This parameter specifies the primary SMTP e-mail address.

<emailAddressPolicyEnabled>

No

This parameter specifies whether the e-mail address policy for this mailbox is enabled. The default value is true.

<owningOrganization>

No

This parameter specifies the path of the hosted organization that contains the address list (AL), global address list (GAL), and offline address book (OAB) as well-known-objects. By default it is the LDAP parent container of the object.

Remarks

Rollback Method: MailDisableContact

Checks the otherWellKnownObjects property on the parent container to see if there is a WKGUID=9E444526CB6F4D5C9A59C9A84E26B627 set on the organization. If so, it appends the DN of the well-known-object to the showInAddressBook after removing any default entries. This is the hosted organization AL.

Checks the otherWellKnownGuids property on the parent container to see if there is a WKGUID=89FB25B7DF784FC198A493E2E8A0EE7E set on the org. If so, it appends the DN of the well-known-object to the showInAddressBook. This is the hosted organization GAL.

Sets the parent container as an otherWellKnownObjects on the contact. WKGUID=B7AE2ABCCBAD41A28973559FCA154DB0

Security

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

Sample Code

Example XML Request

<request> 
  <data> 
    <!--The domain controller to use for Active Directory actions.--> 
    <preferredDomainController>AD01.Fabrikam.Com</preferredDomainController> 
    <!--The LDAP path of the contact object.--> 
    <path>LDAP://CN=debrag@AlpineSkiHouse.com,OU=AlpineSkiHouse,OU=ConsolidatedMessenger,OU=Hosting,DC=fabrikam,DC=com</path> 
    <!--Specifies the target e-mail address.--> 
    <externalEmailAddress>DebraGarciaExt@other.com</externalEmailAddress> 
    <!--Specifies the primary SMTP e-mail address.--> 
    <primarySmtpAddress>debrag@alpineskihouse.com</primarySmtpAddress> 
    <!--Specifies whether the e-mail address policy for this mailbox is enabled.  The default value is false.--> 
    <emailAddressPolicyEnabled>false</emailAddressPolicyEnabled> 
    <!--Specifies the path of the hosted organization that contains the AL, GAL, and OAB as other-well-known-objects.  By default it is the LDAP parent container of the object.--> 
    <owningOrganization>LDAP://OU=AlpineSkiHouse,OU=ConsolidatedMessenger,OU=Hosting,DC=fabrikam,DC=com</owningOrganization> 
  </data> 
  <procedure> 
    <execute namespace="Exchange 2007 Provider" procedure="MailEnableContact" impersonate="1"> 
      <before source="data" sourcePath="preferredDomainController" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="path" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="externalEmailAddress" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="primarySmtpAddress" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="emailAddressPolicyEnabled" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="owningOrganization" 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::MailDisableContact