private void ProcessCheckLostOrders() { try { string subject; string body; orderHistoryScope = container.BeginLifetimeScope(); _orderHistoryLogic = orderHistoryScope.Resolve <IOrderHistoryLogic>(); subject = _orderHistoryLogic.CheckForLostOrders(out body); StringBuilder sbMsgBody = new StringBuilder(); sbMsgBody.Append(body); if ((subject != null) && (subject.Length > 0) && (body != null) && (body.Length > 0)) { _emailClient = lostOrdersScope.Resolve <IEmailClient>(); //_log.WriteErrorLog("BEK: " + subject + ";" + body ); _emailClient.SendEmail(Configuration.FailureEmailAdresses, null, null, "BEK: " + subject, body); } } catch (Exception ex) { _log.WriteErrorLog("Error in ProcessCheckLostOrdersMinuteTick", ex); KeithLink.Common.Impl.Email.ExceptionEmail.Send(ex); } }