Creates an e-mail–enabled user in Microsoft Exchange Server 2000 or an e-mail–enabled INetOrgPerson in Exchange Server 2003.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in microsoft.metadirectoryservicesex.dll)

Usage

Visual Basic
Dim TargetADMA As ConnectedMA
Dim DistinguishedName As ReferenceValue
Dim Alias As String
Dim SMTPEmail As String
Dim Exchange2003InetOrgPerson As Boolean
Dim returnValue As CSEntry

returnValue = ExchangeUtils.CreateMailEnabledUser(TargetADMA, DistinguishedName, Alias, SMTPEmail, Exchange2003InetOrgPerson)

Syntax

Visual Basic
Public Shared Function CreateMailEnabledUser ( _
		TargetADMA As ConnectedMA, _
		DistinguishedName As ReferenceValue, _
		Alias As String, _
		SMTPEmail As String, _
		Exchange2003InetOrgPerson As Boolean _
) As CSEntry
C#
public static CSEntry CreateMailEnabledUser (
		ConnectedMA TargetADMA,
		ReferenceValue DistinguishedName,
		string Alias,
		string SMTPEmail,
		bool Exchange2003InetOrgPerson
)
C++
public:
static CSEntry^ CreateMailEnabledUser (
		ConnectedMA^ TargetADMA, 
		ReferenceValue^ DistinguishedName, 
		String^ Alias, 
		String^ SMTPEmail, 
		bool Exchange2003InetOrgPerson
)
J#
public static CSEntry CreateMailEnabledUser (
		ConnectedMA TargetADMA, 
		ReferenceValue DistinguishedName, 
		String Alias, 
		String SMTPEmail, 
		boolean Exchange2003InetOrgPerson
)
JScript
public static function CreateMailEnabledUser (
		TargetADMA : ConnectedMA, 
		DistinguishedName : ReferenceValue, 
		Alias : String, 
		SMTPEmail : String, 
		Exchange2003InetOrgPerson : boolean
) : CSEntry

Parameters

TargetADMA

The Active Directory management agent through which the new object is provisioned.

DistinguishedName

The distinguished name of the user.

Alias

The e-mail alias of the user.

SMTPEmail

The SMTP address of the user.

Exchange2003InetOrgPerson

If this argument is true, this method creates an Exchange 2003 INetOrgPerson user; if this argument is false, this method creates an Exchange 2000 user.

Return Value

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

Exceptions

Exception type Condition
System.ArgumentException

A required parameter is not present.

System.ArgumentNullException

A required parameter is null.

System.ArgumentOutOfRangeException

A limit is too large or too small.

AttributeNotInInclusionListException

A required attribute is not selected in the management agent.

System.InvalidOperationException

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.

NoSuchObjectTypeException

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.

Platforms

Target Platforms

See Also