SmtpPermissionAttribute Class
Controls access to Simple Mail Transport Protocol (SMTP) servers.
Assembly: System (in System.dll)
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets::Assembly|AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Constructor|AttributeTargets::Method, AllowMultiple = true, Inherited = false)] public ref class SmtpPermissionAttribute sealed : public CodeAccessSecurityAttribute
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.
System::Attribute
System.Security.Permissions::SecurityAttribute
System.Security.Permissions::CodeAccessSecurityAttribute
System.Net.Mail::SmtpPermissionAttribute
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.