protected void UpdateTargetServerSettings() { string hostname = targetHostnameTextBox.Text; string username = targetUsernameTextBox.Text; string password = targetPasswordTextBox.Text; int port = (int)targetPortNumeric.Value; bool ssl = checkBox2.Checked; if (!string.IsNullOrEmpty(hostname) && !string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) { targetServerSettings = new MailServerSettings(); targetServerSettings.Hostname = hostname; targetServerSettings.Username = username; targetServerSettings.Password = password; targetServerSettings.Port = (port != 0) ? port : 143; targetServerSettings.UseSSL = ssl; } else { MessageBox.Show("The target settings must contain at minimum a valid hostname, username, and password"); } }
protected void UpdateSourceServerSettings() { string hostname = sourceHostnameTextBox.Text; string username = sourceUsernameTextBox.Text; string password = sourcePasswordTextBox.Text; int port = (int)sourcePortNumeric.Value; bool ssl = checkBox1.Checked; if (!string.IsNullOrEmpty(hostname) && !string.IsNullOrEmpty(username) && !string.IsNullOrEmpty(password)) { sourceServerSettings = new MailServerSettings(); sourceServerSettings.Hostname = hostname; sourceServerSettings.Username = username; sourceServerSettings.Password = password; sourceServerSettings.Port = (port != 0) ? port : 143; sourceServerSettings.UseSSL = ssl; } else { MessageBox.Show("The source settings must contain at minimum a valid hostname, username, and password"); } }