private void StartExporter(IMailbox mailbox) { var destinationControl = MailDestination.Content as IDestinationManager; if (destinationControl != null) { var target = destinationControl.GetDestination(mailbox.Id); if (target is IMessageReader) { var source = mailbox.GetSource(); source.TestOnly = TestOnlyCheckBox.IsChecked == true; target.Name = source.Name; ThreadPool.QueueUserWorkItem(state => { try { var exporter = ConnectSourceDestination(source, target); mailbox.StartExporter(exporter); } catch (Exception ex) { Logger.Error("Failed to setup exporter " + source.Name, ex); } }); } } }