System.Net.Mail.SmtpPermission Class

Controls access to Simple Mail Transport Protocol (SMTP) servers.

See Also: SmtpPermission Members


public sealed class SmtpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission


The System.Net.Mail.SmtpPermission and System.Net.Mail.SmtpPermissionAttribute classes control access to SMTP host computers. The System.Net.Mail.SmtpClient class demands an System.Net.Mail.SmtpPermission when sending electronic mail to the SMTP host for delivery.

The System.Net.Mail.SmtpAccess enumeration specifies the level of access controlled by an instance of this permission.


Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0