SmtpAccess Enumeration

 

Specifies the level of access allowed to a Simple Mail Transport Protocol (SMTP) server.

Namespace:   System.Net.Mail
Assembly:  System (in System.dll)

Public Enumeration SmtpAccess

Member nameDescription
Connect

Connection to an SMTP host on the default port (port 25).

ConnectToUnrestrictedPort

Connection to an SMTP host on any port.

None

No access to an SMTP host.

The SmtpAccess enumeration is used by the SmtpPermission and SmtpPermissionAttribute classes to specify a level of access to an SMTP host computer. The SmtpClient class demands an SmtpPermission when sending electronic mail to the SMTP host for delivery.

The following code example uses the SmtpAccess enumeration to create a permission object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: