MailProfile.AddPrincipal MailProfile.AddPrincipal MailProfile.AddPrincipal Method

Definition

Associates a security principal with the referenced mail profile.

Overloads

AddPrincipal(String) AddPrincipal(String) AddPrincipal(String)

Associates a security principal with the referenced mail profile.

AddPrincipal(String, Boolean) AddPrincipal(String, Boolean) AddPrincipal(String, Boolean)

Associates a security principal with the referenced mail profile.

AddPrincipal(String) AddPrincipal(String) AddPrincipal(String)

Associates a security principal with the referenced mail profile.

public:
 void AddPrincipal(System::String ^ principalName);
public void AddPrincipal (string principalName);
Public Sub AddPrincipal (principalName As String)
Parameters
principalName
String String String

A String value that specifies the name of the security principal.

Examples

Using Database Mail

Remarks

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.

AddPrincipal(String, Boolean) AddPrincipal(String, Boolean) AddPrincipal(String, Boolean)

Associates a security principal with the referenced mail profile.

public:
 void AddPrincipal(System::String ^ principalName, bool isDefaultProfile);
public void AddPrincipal (string principalName, bool isDefaultProfile);
Public Sub AddPrincipal (principalName As String, isDefaultProfile As Boolean)
Parameters
principalName
String String String

A String value that specifies the name of the security principal.

isDefaultProfile
Boolean Boolean 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.

Examples

Using Database Mail

Remarks

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.

See Also

Applies to