public Configuration(PopConnectionSettings InPop, SmtpConnectionSettings InSmtp)
        {
            InitializeComponent();

            this.InPopSrettings = InPop;
            this.InSmtpSettings = InSmtp;

            TempPopSettings  = new PopConnectionSettings();
            TempSmtpSettings = new SmtpConnectionSettings();
            TempPopSettings.CloneFrom(InPop);
            TempSmtpSettings.CloneFrom(InSmtp);

            InPopHostname.Text  = TempPopSettings.Hostname;
            InPopPort.Text      = TempPopSettings.Port.ToString();
            InPopUsername.Text  = TempPopSettings.UserLogin;
            InPopPassword.Text  = TempPopSettings.UserPassword;
            InPopRefrate.Text   = TempPopSettings.RefreshRateSeconds.ToString();
            CheckPopSsl.Checked = TempPopSettings.UseSsl;

            InSmtpHostname.Text  = TempSmtpSettings.Hostname;
            InSmtpPort.Text      = TempSmtpSettings.Port.ToString();
            InSmtpLogin.Text     = TempSmtpSettings.UserLogin;
            InSmtpPassword.Text  = TempSmtpSettings.UserPassword;
            CheckSmtpSsl.Checked = TempSmtpSettings.UseSsl;
        }
        internal override string BuildVerb()
        {
            Creds.CloneFrom(ParentService.GetConfig());

            switch (AuthState)
            {
            case State.NotStarted:
                AuthState = State.SentAuthType;
                return("AUTH PLAIN " + EOL);

            case State.AcceptedAuthType:
                AuthState = State.SentB64;
                return(System.Convert.ToBase64String(
                           System.Text.Encoding.ASCII.GetBytes
                               ("\0" + Creds.UserLogin + "\0" + Creds.UserPassword))
                       + EOL);

            default:
                throw new Exception("no_verbs_left");
            }
        }
 private void ButtonAccept_Click(object sender, EventArgs e)
 {
     InPopSrettings.CloneFrom(TempPopSettings);
     InSmtpSettings.CloneFrom(TempSmtpSettings);
     Close();
 }
 public void SetupConfig(SmtpConnectionSettings InConfig)
 {
     SmtpConfig = new SmtpConnectionSettings();
     SmtpConfig.CloneFrom(InConfig);
 }