Partilhar via


Método MailProfile.AddPrincipal (String, Boolean)

Associates a security principal with the referenced mail profile.

Namespace:  Microsoft.SqlServer.Management.Smo.Mail
Assembly:  Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)

Sintaxe

'Declaração
Public Sub AddPrincipal ( _
    principalName As String, _
    isDefaultProfile As Boolean _
)
'Uso
Dim instance As MailProfile 
Dim principalName As String 
Dim isDefaultProfile As Boolean

instance.AddPrincipal(principalName, _
    isDefaultProfile)
public void AddPrincipal(
    string principalName,
    bool isDefaultProfile
)
public:
void AddPrincipal(
    String^ principalName, 
    bool isDefaultProfile
)
member AddPrincipal : 
        principalName:string * 
        isDefaultProfile:bool -> unit
public function AddPrincipal(
    principalName : String, 
    isDefaultProfile : boolean
)

Parâmetros

  • principalName
    Tipo: System.String
    A String value that specifies the name of the security principal.
  • isDefaultProfile
    Tipo: System.Boolean
    A Boolean value that specifies whether the referenced profile is set as the default profile for the principal. If True, the referenced profile is the default profile for the principal.If False, the referenced profile is not the default profile for the principal.

Comentários

A principal refers to a database user, a database role or server role, an application role, or a SQL Server login. You can add these types of users to the mail profile.

Exemplos

Usando o Database Mail

Consulte também

Referência

MailProfile Classe

Sobrecarregado AddPrincipal

Namespace Microsoft.SqlServer.Management.Smo.Mail

Outros recursos

Database Mail