System 2.0.0.0 4.0.0.0 System.Security.Permissions.CodeAccessSecurityAttribute System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)

The and classes control access to SMTP host computers. The class demands an when sending electronic mail to the SMTP host for delivery.

The enumeration specifies the level of access controlled by an instance of this permission.

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

- Constructor
  2.0.0.0
  4.0.0.0

  The security action defines which callers must have the permission.

  Initializes a new instance of the class.

  One of the values that specifies the permission behavior.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added.

  If you specify an invalid value when setting this property, the method will throw an when called by the system.

  Gets or sets the level of access to SMTP servers controlled by the attribute.

- Method
  2.0.0.0
  4.0.0.0
  System.Security.IPermission

  This method should only be called by the security system, never by application code.

  At compile time, attributes are converted into security declarations and stored in Microsoft intermediate language (MSIL) metadata. At run time, the security declarations in metadata are used to create permission objects that map to the state described in the metadata.

  Creates a permission object that can be stored with the in an assembly's metadata.

  An instance.