public ImportExportEmailsForm(MailClientForm parentForm) { InitializeComponent(); _parentForm = parentForm; foreach (var folder in _parentForm.FolderList.Values) { comboBoxImportTo.Items.Add(folder.FolderName); comboBoxExportFrom.Items.Add(folder.FolderName); } comboBoxImportTo.Items.Add("Inbox"); comboBoxImportTo.Items.Add("Sent Emails"); comboBoxExportFrom.Items.Add("Inbox"); comboBoxExportFrom.Items.Add("Sent Emails"); if (parentForm.ServerInfo.Preset != ServerInfo.ServerPreset.Gmail) { comboBoxImportFrom.Items.Add("Gmail"); } if (parentForm.ServerInfo.Preset != ServerInfo.ServerPreset.Yandex) { comboBoxImportFrom.Items.Add("Yandex"); } comboBoxImportFrom.Items.Add("Custom Server"); comboBoxImportFrom.Items.Add("Browse on PC"); }
public MailPreview(MailClientForm parentForm, InboxEmail inboxEmail) { InitializeComponent(); _parentForm = parentForm; tbFrom.Text = inboxEmail.From; tbTo.Text = inboxEmail.To; tbSubject.Text = inboxEmail.Subject; pictureBoxLoading.Visible = true; Task.Run(() => { var message = _parentForm.MailReceiver.GetEmail(EmailType.Inbox, inboxEmail.UniqueId); GetAttachments(message); if (!string.IsNullOrEmpty(message.HtmlBody)) { this.Invoke((Action)(() => webBrowserBody.DocumentText = message.HtmlBody)); this.Invoke((Action)(() => webBrowserBody.Visible = true)); } else if (!string.IsNullOrEmpty(message.TextBody)) { this.Invoke((Action)(() => tbBody.Text = message.TextBody)); } this.Invoke((Action)(() => pictureBoxLoading.Visible = false)); this.Invoke((Action)(() => pictureBoxLoading.Enabled = false)); _parentForm.MailReceiver.SetMessageSeen(EmailType.Inbox, inboxEmail.UniqueId); }); lbDate.Text = "Arrival Time: " + inboxEmail.ArrivalTime; }
public MailReceiver(string mailServer, int port, bool ssl, string login, string password, MailClientForm mailClientForm) { this.mailServer = mailServer; this.port = port; this.ssl = ssl; this.Login = login; this.Password = password; _mailClientForm = mailClientForm; }
public FolderEdit(MailClientForm parentForm, string foldername) { InitializeComponent(); IsEdit = true; OldFolderName = foldername; labelFolderAction.Text = "Enter new name"; this.Text = "Rename Folder"; buttonCreate.Text = "OK"; _parentForm = parentForm; }
public NewEmailForm(MailClientForm parentForm) { _parentForm = parentForm; _username = _parentForm.MailReceiver.Login; _password = _parentForm.MailReceiver.Password; InitializeComponent(); if (!_username.Contains("@")) { tbFrom.Text = _username + _parentForm.ServerInfo.LoginSuffix; } else { tbFrom.Text = _username; } }
public MailPreview(MailClientForm parentForm, Models.CollectionEmail collectionEmail) { InitializeComponent(); _parentForm = parentForm; tbFrom.Text = collectionEmail.From; tbTo.Text = collectionEmail.To; tbSubject.Text = collectionEmail.Subject; tbBody.Text = collectionEmail.TextBody; if (!string.IsNullOrEmpty(collectionEmail.HtmlBody)) { webBrowserBody.DocumentText = collectionEmail.HtmlBody; webBrowserBody.Visible = true; } else if (!string.IsNullOrEmpty(collectionEmail.TextBody)) { tbBody.Text = collectionEmail.TextBody; } lbDate.Text = "Date: " + collectionEmail.Date; }
public SearchForm(MailClientForm parentForm) { InitializeComponent(); _parentForm = parentForm; }
public FolderEdit(MailClientForm parentForm) { InitializeComponent(); _parentForm = parentForm; }
public ImportExportTool(MailClientForm parentForm) { _parentForm = parentForm; }
public LoginForm(MailClientForm parentForm) { InitializeComponent(); _parentForm = parentForm; comboBoxServer.Text = "Gmail"; }