private void SendButton_Click(object sender, RoutedEventArgs e)
        {
            Message    msg = new Message(currentuser.Email, ToBox.Text, BodyBox.Text, ThemeBox.Text);
            MailSender ms  = new MailSender(mailservice, currentuser);

            IncludeAttachments(msg);
            messagelist.Add(msg);

            Task send = new Task(() => ms.Send(msg));

            try
            {
                send.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #2
0
        public void Handle(string toAddress)
        {
            MailSender mailsender = new MailSender();

            mailsender.Send(toAddress, "This is non-ninject example.");
        }