Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SmtpPermission.AddPermission Method

Adds the specified access level value to the permission.

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

public void AddPermission(
	SmtpAccess access


Type: System.Net.Mail.SmtpAccess

One of the SmtpAccess values.

Use this method to modify access to Simple Mail Transport Protocol servers by adding to the state of this permission instance.

The following code example adds Connect access to a permission object.

public static SmtpPermission GiveFullAccess(SmtpPermission permission)
    return permission;

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft