Compartilhar via


How to: Configure a Hosted Email Service

 

Applies To: Windows Server 2012 Essentials

The built-in configuration wizard allows a user to configure the add-in. Using the wizard, a user can opt in for automatic password synchronization between local server accounts and the corresponding email accounts on the hosted email service. Once a service has been configured with the wizard, the wizard activates the other built-in UI’s for hosted email integration. You can also invoke the same wizard to unconfigure a hosted service.

To integrate the configuration wizard into your solution, you can call the wizard at %ProgramFiles%\Windows Server\Bin\Wssg.HostedEmailConfigureWizard.exe. The wizard uses the HostedEmailIntegrationManager class to activate the service and provide information. Instead of using this wizard, you may choose to implement your own configuration wizard. For example, if you are using an authentication method other than username/password, you may need to implement your own configuration/unconfiguration wizard for the integration.

The following code samples show how to call the configuration wizard from the Dashboard. For the complete code samples, see the ContosoHostedEmailHomepageAddin project in Quickstart: Creating a Hosted Email Adapter.

Example

The following code sample is the ContosoHostedEmail.home file, which describes adding a number of tasks to the Email tab on the dashboard. The highlighted section calls a VBS file, which in turn calls the configuration wizard (as shown in the next sample).

<?xml version="1.0" encoding="utf-8" ?>  
<Tasks version="2.0">  
  <MailServiceTasks>  
    <Task  
       name="HE_Sample_Service_GS_Task_Name"  
       description="HE_Sample_Service_GS_Task_Description"  
       id="3983E9AC-B6D1-4A2A-881C-4B1CEFCA5266">  
      <Action  
        name="HE_Sample_Service_GS_Action_Learn_More"  
        image="LearnMore"  
        type="url"  
        exelocation="https://www.contoso.com"/>  
      <Action  
        name="HE_Sample_Service_GS_Action_Name"  
        image="Logo"  
        type="exe"  
        exelocation="%ProgramFiles%\Windows Server\bin\Wssg.HostedEmailConfigureWizard.vbs"/>  
    </Task>  
  </MailServiceTasks>  
</Tasks>  

Example

The following code sample is the VBS file that the previous code calls to activate the configuration wizard. In this case, the wizard is called to integrate the service specified by the GUID.

CreateObject
("Wscript.Shell").run "Wssg.HostedEmailConfigureWizard.exe config 3983E9AC-B6D1-4A2A-881C-4B1CEFCA5266"