Share via


Hosted Exchange::CreateMailboxPlan

This procedure creates a new mailbox service plan in the customer plan database. Also assigns features to the plan and categorizes the plan. Specified features and categories must exist in the plan database.

Arguments

Input Arguments Required Description

<planName>

Yes

Name of the new plan. Must be unique.

<planDescription>

Yes

Description of plan.

<planCategories>

No

Existing category names to which the plan is assigned.

<planFeatures>

No

Existing plan features to assign to the plan.

Remarks

Method Syntax

public string CreateMailboxPlan( 
string planName,  
string description,  
string planCategoriesXmlString,  
string planFeaturesXmlString, 
bool sendCredentials) 
        

Sample Code

Example XML Response

MPS XML Response in string format.

<response> 
<data> 
<path>LDAP://CN=bill@litwareinc.com,OU=litwareinc,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</path> 
<name>bill</name> 
<SMTPDomain>Suevanity2.com</SMTPDomain> 
<createSMTPDomain /> 
<preferredDomainController>AD01.fabrikam.com</preferredDomainController> 
</data> 
</response> 
                

Typical C# Usage

//Get user name and password.                    
        string userName = this.Request.ServerVariables.Get("AUTH_USER"); 
        string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD"); 
        //Set credentials. 
        hostedExch.PreAuthenticate = true; 
        hostedExch.Credentials = new NetworkCredential(userName,pass); 
 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = hostedExch.CreateConsumerVanityDomain(path,name,smtpDomain, preferredDomainController,sendCredentials); 
                         
        // set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
lblDone.InnerText = successMsg; 
        

Applies To

Hosted Exchange Web Service for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Hosted Exchange::CreateMailbox
Hosted Exchange::ChangeUserMailboxPlan