Skip to content

SPIncomingEmailSettings

dscbot edited this page Mar 17, 2023 · 7 revisions

SPIncomingEmailSettings

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes' Yes
Ensure Required String Present ensures Incoming Email is enabled. Absent disables incoming email Present, Absent
UseAutomaticSettings Write Boolean Automatic Settings enables a local SMTP service on the SharePoint server. Set to False to use an external drop folder
UseDirectoryManagementService Write String Set to Yes, the service supports the creation and management of e-mail distribution groups from SharePoint Sites, and creates mail contacts mail enabled SharePoint lists. Set to Remote to use a remote SharePoint Directory Management Web Service Yes, No, Remote
RemoteDirectoryManagementURL Write String URL to the remote SharePoint Directory Management Web Service
ServerAddress Write String SMTP Server Address when Directory Managment Service mode is used
DLsRequireAuthenticatedSenders Write Boolean SharePoint Distribution lists accept from authenticated senders only
DistributionGroupsEnabled Write Boolean Allow creation of distribution groups from within SharePoint
ServerDisplayAddress Write String Email server display address '[email protected]'
DropFolder Write String Path to email drop folder if not using Automatic Settings

Description

Type: Common Requires CredSSP: No

This resource is used to enable and configure SharePoint incoming email. Setting the Ensure parameter to 'Present' or 'Absent' will enable or disable incoming email accordingly. When enabled, this resource allows for configuring of required parameters for both Automatic and Advanced methods of supporting SharePoint incoming email.

This resource does not currently support setting the Active Directory OU where SharePoint can create mail contacts and distribution groups.

Examples

Example 1

This example shows how to configure SharePoint Incoming Email in Automatic Mode

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPIncomingEmailSettings AutomaticEmail
        {
            IsSingleInstance              = "Yes"
            Ensure                        = "Present"
            UseAutomaticSettings          = $true
            UseDirectoryManagementService = "No"
            ServerDisplayAddress          = "contoso.com"
            PsDscRunAsCredential          = $SetupAccount
        }
    }
}

Example 2

This example shows how to configure SharePoint Incoming Email in Advanced Mode

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPIncomingEmailSettings AutomaticEmail
        {
            IsSingleInstance              = "Yes"
            Ensure                        = "Present"
            UseAutomaticSettings          = $false
            UseDirectoryManagementService = "No"
            ServerDisplayAddress          = "contoso.com"
            DropFolder                    = "\\MailServer\Pickup"
            PsDscRunAsCredential          = $SetupAccount
        }
    }
}
Clone this wiki locally