public void Handle(LeadsUnassigned message) { var leads = _leadService.GetByIds(message.UnassignedLeadsIds.ToArray()); var department = _departmentService.GetByIdWithManager(Constants.SalesDepartmentId); var body = new StringBuilder(); body.AppendLine("The following leads have been unassigned due to the consultant recently leaving"); body.AppendLine(); foreach (var lead in leads) { body.AppendLine(lead.Name + ", " + lead.Address1 + ", " + lead.Address2 + ", " + lead.Address3 + ", "); } _emailSender.To.Add(department.Manager.EmailAddress); _emailSender.From = Constants.SenderEmailAddress; _emailSender.Body = body.ToString(); _emailSender.Send(); }