.NET Framework Class Library SmtpPermissionAttribute Class Controls access to Simple Mail Transport Protocol (SMTP) servers.

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

Syntax
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.Assembly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple := True, _
Inherited := False)> _
Public NotInheritable Class SmtpPermissionAttribute _
Inherits CodeAccessSecurityAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = true,
Inherited = false)]
public sealed class SmtpPermissionAttribute : CodeAccessSecurityAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets::Assembly|AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Constructor|AttributeTargets::Method, AllowMultiple = true,
Inherited = false)]
public ref class SmtpPermissionAttribute sealed : public CodeAccessSecurityAttribute
[<Sealed>]
[<SerializableAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = true,
Inherited = false)>]
type SmtpPermissionAttribute =
class
inherit CodeAccessSecurityAttribute
end
The SmtpPermissionAttribute type exposes the following members.

Constructors

Methods

Explicit Interface Implementations

Remarks
The SmtpPermission and SmtpPermissionAttribute classes control access to SMTP host computers. The SmtpClient class demands an SmtpPermission when sending electronic mail to the SMTP host for delivery. The SmtpAccess enumeration specifies the level of access controlled by an instance of this permission.

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also
|
Biblioteca de clases de .NET Framework SmtpPermissionAttribute (Clase) Controla el acceso a los servidores SMTP (Protocolo simple de transferencia de correo).

Jerarquía de herencia
Espacio de nombres:
System.Net.Mail
Ensamblado:
System (en System.dll)

Sintaxis
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.Assembly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple := True, _
Inherited := False)> _
Public NotInheritable Class SmtpPermissionAttribute _
Inherits CodeAccessSecurityAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = true,
Inherited = false)]
public sealed class SmtpPermissionAttribute : CodeAccessSecurityAttribute
[SerializableAttribute]
[AttributeUsageAttribute(AttributeTargets::Assembly|AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Constructor|AttributeTargets::Method, AllowMultiple = true,
Inherited = false)]
public ref class SmtpPermissionAttribute sealed : public CodeAccessSecurityAttribute
[<Sealed>]
[<SerializableAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple = true,
Inherited = false)>]
type SmtpPermissionAttribute =
class
inherit CodeAccessSecurityAttribute
end
El tipo SmtpPermissionAttribute expone los siguientes miembros.

Constructores

Implementaciones explícitas de interfaces

Comentarios
Las clases SmtpPermission y SmtpPermissionAttribute controlan el acceso a los equipos host SMTP. La clase SmtpClient exige un permiso SmtpPermission cuando se envía correo electrónico al host SMTP para su entrega. La enumeración SmtpAccess especifica el nivel de acceso controlado por una instancia de dicho permiso.

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Seguridad para subprocesos
Todos los miembros static ( Shared en Visual Basic) públicos de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Vea también
|