private void Email_Completed(object sender, EmailCompletedEventArgs e) { if (!e.Success) { MessageBoxResult result = MessageBox.Show("The email you just tried to send failed. Press OK to try again.", "Sending Failed", MessageBoxButton.OKCancel); if (result == MessageBoxResult.OK) { ((RemoteEmail)sender).Email(); } } }