private void renderEmailHeader(EmailHeader emailHeader)
        {
            _idIndex += 1;
            var id             = "emailHeader" + _idIndex;
            var shouldCollapse = emailHeader.Headers.Count() > 1;

            _output
            //.AppendLine(@"<div id=""{0}"" class=""history-email-header collapse in""><i class=""icon-envelope"" title=""Click to expand"" data-toggle=""collapse"" data-target=""#{0}""></i>"
            .AppendLine(@"<div id=""{0}"" class=""history-email-header {1}""><i class=""icon-envelope"" {2} data-target=""#{0}""></i>"
                        .ToFormat(id, shouldCollapse ? "collapse in" : "", shouldCollapse ? @"data-toggle=""collapse"" title=""Click to expand""" : ""));

            var emailHeaderItem = emailHeader.Headers.First();

            _output
            .AppendLine(@"<h5 class=""history-inline-header"">{0} : {1}</h5>"
                        .ToFormat(emailHeaderItem.Title.ToLower().Capitalize(), emailHeaderItem.Text));

            var rest = emailHeader.Headers.Skip(1).ToArray();

            if (rest.Any())
            {
                _output.AppendLine(@"<div class=""history-inline-content""><ul>");
                foreach (var header in rest)
                {
                    _output.AppendLine(@"<li><span class=""email-header-name"">{0}</span> <span class=""email-header-text"">{1}</span></li>".ToFormat(header.Title.ToLower().Capitalize(), header.Text));
                }
                _output.Append(@"</ul></div>");
            }

            _output.AppendLine("</div>");
        }
        private void renderEmailHeader(EmailHeader emailHeader)
        {
            _idIndex += 1;
            var id = "emailHeader" + _idIndex;
            var shouldCollapse = emailHeader.Headers.Count() > 1;
            _output
                //.AppendLine(@"<div id=""{0}"" class=""history-email-header collapse in""><i class=""icon-envelope"" title=""Click to expand"" data-toggle=""collapse"" data-target=""#{0}""></i>"
                .AppendLine(@"<div id=""{0}"" class=""history-email-header {1}""><i class=""icon-envelope"" {2} data-target=""#{0}""></i>"
                .ToFormat(id, shouldCollapse ? "collapse in" : "", shouldCollapse ? @"data-toggle=""collapse"" title=""Click to expand""" : ""));

            var emailHeaderItem = emailHeader.Headers.First();
            _output
                .AppendLine(@"<h5 class=""history-inline-header"">{0} : {1}</h5>"
                .ToFormat(emailHeaderItem.Title.ToLower().Capitalize(), emailHeaderItem.Text));

            var rest = emailHeader.Headers.Skip(1).ToArray();
            if (rest.Any())
            {
                _output.AppendLine(@"<div class=""history-inline-content""><ul>");
                foreach (var header in rest)
                {
                    _output.AppendLine(@"<li><span class=""email-header-name"">{0}</span> <span class=""email-header-text"">{1}</span></li>".ToFormat(header.Title.ToLower().Capitalize(), header.Text));
                }
                _output.Append(@"</ul></div>");
            }

            _output.AppendLine("</div>");
        }
        private static void renderEmailHeader(EmailHeader emailHeader, StringBuilder output)
        {
            if (!emailHeader.Headers.Any())
            {
                return;
            }

            _idIndex += 1;
            var id = "emailHeader" + _idIndex;

            output.AppendLine(@"<div id=""{0}"" class=""history-email-header"">".ToFormat(id));

            var headers = emailHeader.Headers.ToArray();

            output.AppendLine(@"<div class=""history-inline-content""><ul class=""unstyled"">");
            foreach (var header in headers)
            {
                var headerText  = header.Text;
                var headerTitle = header.Title.ToLower().Capitalize();

                output.AppendLine(@"<li><span class=""email-header-name"">{0}</span> <span class=""email-header-text"">{1}</span></li>".ToFormat(headerTitle, headerText));
            }
            output.Append(@"</ul></div>");

            output.AppendLine("</div>");
        }
        private static void renderEmailHeader(EmailHeader emailHeader, StringBuilder output)
        {
            if (!emailHeader.Headers.Any()) return;

            _idIndex += 1;
            var id = "emailHeader" + _idIndex;
            output.AppendLine(@"<div id=""{0}"" class=""history-email-header"">".ToFormat(id));

            var headers = emailHeader.Headers.ToArray();
            output.AppendLine(@"<div class=""history-inline-content""><ul class=""unstyled"">");
            foreach (var header in headers)
            {
                var headerText = header.Text;
                var headerTitle = header.Title.ToLower().Capitalize();

                output.AppendLine(@"<li><span class=""email-header-name"">{0}</span> <span class=""email-header-text"">{1}</span></li>".ToFormat(headerTitle, headerText));
            }
            output.Append(@"</ul></div>");

            output.AppendLine("</div>");
        }