Condividi tramite


IEmailHelperService.ChangeUsersMembershipInDistributionGroup Method

Requests the addition and removal of users from the specified e-mail distribution group.

Namespace:  Microsoft.SharePoint.EmailIntegration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Function ChangeUsersMembershipInDistributionGroup ( _
    Alias As String, _
    AddNt4NameList As String(), _
    DeleteNt4NameList As String(), _
    DeleteAllCurrentMembers As Boolean _
) As RequestStatus
'Usage
Dim instance As IEmailHelperService
Dim Alias As String
Dim AddNt4NameList As String()
Dim DeleteNt4NameList As String()
Dim DeleteAllCurrentMembers As Boolean
Dim returnValue As RequestStatus

returnValue = instance.ChangeUsersMembershipInDistributionGroup(Alias, _
    AddNt4NameList, DeleteNt4NameList, _
    DeleteAllCurrentMembers)
RequestStatus ChangeUsersMembershipInDistributionGroup(
    string Alias,
    string[] AddNt4NameList,
    string[] DeleteNt4NameList,
    bool DeleteAllCurrentMembers
)

Parameters

  • AddNt4NameList
    Type: []

    The users, identified by their Active Directory names, that are added to the group.

  • DeleteNt4NameList
    Type: []

    The users, identified by their Active Directory names, that are removed from the group.

  • DeleteAllCurrentMembers
    Type: System.Boolean

    A value indicating whether all members are removed from the group before the users in AddNt4NameList are added.

Return Value

Type: Microsoft.SharePoint.EmailIntegration.RequestStatus
A RequestStatus value that reports the outcome of the operation.

Remarks

If DeleteAllCurrentMembers is true, all current members are deleted and then all contacts in AddNt4NameList are added.

The AddNt4NameList and DeleteNt4NameList names are in the format domain/username.

See Also

Reference

IEmailHelperService Interface

IEmailHelperService Members

Microsoft.SharePoint.EmailIntegration Namespace