The error is…
Second Main eMailIt error unable to set argument 4 - the AppleScript value <NSAppleEventDescriptor: 'utxt'("{88,0}")> could not be coerced to type {_NSRange=QQ}. number -10000 p = 62.3
set theRange to "{" & theRangeStart & "," & theFirstOffSetEndOfRange & "}" as text
A range needs to be either a record in the form {location:x |length|:y}, the result of the NSMakeRange() function, or a list of the two numbers {x, y}. You're trying to use a string, which won't work. Try:
set theRange to {location:theRangeStart, |length|:theFirstOffSetEndOfRange}
Control-R will type it for you in ASObjC Explorer.
set firstEndOffSetRegex to current application's NSRegularExpression's regularExpressionWithPattern:("Total Mail items processed+") options:0 |error|:(missing value)
That + is meaningless there. You need to have some understanding of regular _expression_ syntax. The + character has a specific meaning -- as you have it, it means the letter d, followed by the letter d 0 or more times. That's why it made such a difference for the bullets and diamonds -- it found runs of them, rather than individual characters.
It's not a crime to use a regular _expression_ search for a literal match -- it's saved you a bit of code and it may even be a wash in terms of performance -- but you need to be aware that certain characters can have other meaning in a regular _expression_ pattern, and need to be escaped to be treated as literal values. The characters concerned are * ? + [ ( ) { } ^ $ | \ . / so you need do something if any of them could appear in hourCutOff, for example.
If in doubt, you can let NSRegularExpression handle the problem. So change this:
set hourReportRegex to current application's NSRegularExpression's regularExpressionWithPattern:((my hourCutOff) & " Report+” as text ) options:0 |error|:(missing value)
To something like this:
set escapedSearchString to current application's NSRegularExpression's escapedPatternForString:((my hourCutOff) & " Report" as text)
set hourReportRegex to current application's NSRegularExpression's regularExpressionWithPattern:escapedSearchString options:0 |error|:(missing value)
But if you're doing any sort of serious text manipulation, you need to get to know regular expressions. Look up NSRegularExpression for starters.
Also, I can't figure out what your repeat loops are doing -- I suspect they are in the wrong place. But if what you're actually trying to do is find ranges between two strings, well that's exactly the sort of thing a regular _expression_ can do for you. Are you actually trying to style the text between "(my hourCutOff) & " Report+"" and "Total Mail items processed"?
PS Should this now be in the ASObjC list?
I suspect there are plenty of people on this list who are interested in ways to work around Mail's scripting short-comings, and there are experts in regular expressions always lurking. Seems to me that list is probably better off reserved for queries specific to Xcode-based projects these days.