Edit

Share via


SmtpPermission Constructors

Definition

Initializes a new instance of the SmtpPermission class.

Overloads

SmtpPermission(Boolean)

Initializes a new instance of the SmtpPermission class with the specified state.

SmtpPermission(SmtpAccess)

Initializes a new instance of the SmtpPermission class using the specified access level.

SmtpPermission(PermissionState)

Initializes a new instance of the SmtpPermission class using the specified permission state value.

SmtpPermission(Boolean)

Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs

Initializes a new instance of the SmtpPermission class with the specified state.

public:
 SmtpPermission(bool unrestricted);
public SmtpPermission(bool unrestricted);
new System.Net.Mail.SmtpPermission : bool -> System.Net.Mail.SmtpPermission
Public Sub New (unrestricted As Boolean)

Parameters

unrestricted
Boolean

true if the new permission is unrestricted; otherwise, false.

Remarks

If unrestricted is true, the permission controls Connect access to SMTP servers. If unrestricted is false, the permission controls None access.

Applies to

SmtpPermission(SmtpAccess)

Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs

Initializes a new instance of the SmtpPermission class using the specified access level.

public:
 SmtpPermission(System::Net::Mail::SmtpAccess access);
public SmtpPermission(System.Net.Mail.SmtpAccess access);
new System.Net.Mail.SmtpPermission : System.Net.Mail.SmtpAccess -> System.Net.Mail.SmtpPermission
Public Sub New (access As SmtpAccess)

Parameters

access
SmtpAccess

One of the SmtpAccess values.

Remarks

The permission created by this constructor can be used to help secure access to SMTP servers.

Applies to

SmtpPermission(PermissionState)

Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs
Source:
SmtpPermission.cs

Initializes a new instance of the SmtpPermission class using the specified permission state value.

public:
 SmtpPermission(System::Security::Permissions::PermissionState state);
public SmtpPermission(System.Security.Permissions.PermissionState state);
new System.Net.Mail.SmtpPermission : System.Security.Permissions.PermissionState -> System.Net.Mail.SmtpPermission
Public Sub New (state As PermissionState)

Parameters

state
PermissionState

One of the PermissionState values.

Remarks

The permission created by this constructor can be used to give full access or prevent all access to SMTP servers.

Applies to