SMTPPermission

Table A-13 shows the required SMTPPermission setting for the MailLogon MailSession object function in .NET targets.

Table A-13: SMTPPermission required in .NET targets

MailSession object function

Permission required

MailLogon

Connect (if using default port) or ConnectToUnrestrictedPort

Example 1

The following permission setting allows a Windows Forms application to log onto a mail session and receive mail through a default port:

<IPermission class="System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Access="Connect"/>

Example 2

The following permission setting in a Web Forms target allows application users to log onto a mail provider and receive mail through any available port:

<IPermission class=" SmtpPermission" version="1" Access="ConnectToUnrestrictedPort"/>