ExchangeUtils.CreateMailEnabledContact Method

Creates an e-mail–enabled contact in Microsoft Exchange Server 2000 or Exchange Server 2003.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)


Dim TargetADMA As ConnectedMA
Dim DistinguishedName As ReferenceValue
Dim Alias As String
Dim SMTPEmail As String
Dim returnValue As CSEntry

returnValue = ExchangeUtils.CreateMailEnabledContact(TargetADMA, DistinguishedName, Alias, SMTPEmail)


Public Shared Function CreateMailEnabledContact ( _
    TargetADMA As ConnectedMA, _
    DistinguishedName As ReferenceValue, _
    Alias As String, _
    SMTPEmail As String _
) As CSEntry
public static CSEntry CreateMailEnabledContact (
    ConnectedMA TargetADMA,
    ReferenceValue DistinguishedName,
    string Alias,
    string SMTPEmail
static CSEntry^ CreateMailEnabledContact (
    ConnectedMA^ TargetADMA, 
    ReferenceValue^ DistinguishedName, 
    String^ Alias, 
    String^ SMTPEmail
public static CSEntry CreateMailEnabledContact (
    ConnectedMA TargetADMA, 
    ReferenceValue DistinguishedName, 
    String Alias, 
    String SMTPEmail
public static function CreateMailEnabledContact (
    TargetADMA : ConnectedMA, 
    DistinguishedName : ReferenceValue, 
    Alias : String, 
    SMTPEmail : String
) : CSEntry


  • TargetADMA
    The Active Directory management agent through which the new object is provisioned.
  • DistinguishedName
    The distinguished name of the contact.
  • Alias
    The e-mail alias of the contact.
  • SMTPEmail
    The SMTP address of the contact.

Return Value

Returns a CSEntry object that represents the connected data source entry.


Exception type Condition

A required parameter is not present.


A required parameter is null.


A required attribute is not selected in the management agent.


You tried to create the same custom recipient more than once in the Provision method. This method is called for each metaverse object when a metaverse rules extension exists.


The object type that is referenced is not in the schema.

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.


Target Platforms

See Also


ExchangeUtils Class
ExchangeUtils Members
Microsoft.MetadirectoryServices Namespace
CSEntry Class
ExchangeUtils Class

Other Resources

Example: Mail-Enabled Contact