public NewMail() { InitializeComponent(); smtp = new SMTPClient(settings.SMTPServer, settings.SMTPPort, settings.SMTPSSL); smtp.Authenticate(settings.Username, settings.Password); }
public NewMail(List <string> to, string subject) { InitializeComponent(); toTextBox.Text = String.Join(",", to.ToArray()); subjectTextBox.Text = subject; smtp = new SMTPClient(settings.SMTPServer, settings.SMTPPort, settings.SMTPSSL); smtp.Authenticate(settings.Username, settings.Password); }