Ejemplo n.º 1
0
        internal Pop3AutoProvision(SmtpAddress emailAddress, SecureString password, string userLegacyDN, IAutoProvisionOverrideProvider overrideProvider)
        {
            Pop3AuthenticationMechanism[] array = new Pop3AuthenticationMechanism[2];
            array[0]            = Pop3AuthenticationMechanism.Spa;
            this.authMechanisms = array;
            base..ctor();
            if (emailAddress == SmtpAddress.Empty)
            {
                throw new ArgumentException("cannot be an empty address", "emailAddress");
            }
            string domain = emailAddress.Domain;

            this.userNames = new string[]
            {
                emailAddress.ToString(),
                    emailAddress.Local
            };
            bool flag;

            if (!overrideProvider.TryGetOverrides(domain, ConnectionType.Pop, out this.hostNames, out flag))
            {
                this.hostNames = new string[]
                {
                    "pop." + domain,
                    "mail." + domain,
                    "pop3." + domain,
                    domain
                };
            }
        }
 // Token: 0x06000F82 RID: 3970 RVA: 0x0003F444 File Offset: 0x0003D644
 public PopConnectionSettings(Fqdn serverName, int portNumber, Pop3AuthenticationMechanism authentication, Pop3SecurityMechanism security) : base(ConnectionSettingsType.Pop)
 {
     if (serverName == null)
     {
         throw new ArgumentNullException("serverName", "The serverName parameter cannot be null.");
     }
     if (portNumber < 0)
     {
         throw new ArgumentException("serverName", "The portNumber parameter must have a value greater than 0.");
     }
     this.ServerName     = serverName;
     this.Port           = portNumber;
     this.Authentication = authentication;
     this.Security       = security;
 }
Ejemplo n.º 3
0
 public Pop3AuthenticationParameters(NetworkCredential networkCredential, Pop3AuthenticationMechanism pop3AuthenticationMechanism, Pop3SecurityMechanism pop3SecurityMechanism) : base(networkCredential)
 {
     this.Pop3AuthenticationMechanism = pop3AuthenticationMechanism;
     this.Pop3SecurityMechanism       = pop3SecurityMechanism;
 }
Ejemplo n.º 4
0
 public Pop3AuthenticationParameters(string userName, SecureString userPassword, Pop3AuthenticationMechanism pop3AuthenticationMechanism, Pop3SecurityMechanism pop3SecurityMechanism) : base(userName, userPassword)
 {
     this.Pop3AuthenticationMechanism = pop3AuthenticationMechanism;
     this.Pop3SecurityMechanism       = pop3SecurityMechanism;
 }
Ejemplo n.º 5
0
 // Token: 0x060000E9 RID: 233 RVA: 0x000061EF File Offset: 0x000043EF
 public static string ToStringParameterValue(Pop3AuthenticationMechanism authMechanism)
 {
     return(authMechanism.ToString());
 }
Ejemplo n.º 6
0
        public static bool ValidatePopSettings(bool leaveOnServer, bool mirrored, string host, int port, string username, SecureString password, Pop3AuthenticationMechanism authentication, Pop3SecurityMechanism security, string userLegacyDN, ILog log, out LocalizedException validationException)
        {
            validationException = null;
            bool result2;

            using (IPop3Connection pop3Connection = Pop3Connection.CreateInstance(null))
            {
                Pop3ResultData result = pop3Connection.VerifyAccount();
                if (mirrored && !Pop3AutoProvision.SupportsMirroredSubscription(result))
                {
                    validationException = new Pop3MirroredAccountNotPossibleException();
                    result2             = false;
                }
                else if (leaveOnServer && !Pop3AutoProvision.SupportsLeaveOnServer(result))
                {
                    validationException = new Pop3LeaveOnServerNotPossibleException();
                    result2             = false;
                }
                else
                {
                    result2 = true;
                }
            }
            return(result2);
        }