Use this code:
xml code:
<*PlusSkin Conditions(MailBtn1 = true) *>
<Button Id=atom(mailbtn) CmdId=40198 AccRole=57 Accdesc=rcstr("msgr",4227) ShortcutString=rcstr("msgr",4226) Class="TransparentButton" AccName=rcstr("msgr",4228) AccDefAction=rcstr("msgr",20500) Layout=FlowLayout(0,2,0,2) Active=7 Padding=Rect(0,0,0,0)>
<Element Layout=FillLayout()>
<element class="ToolbarIcon" content=rcimg("msgr",1480) Id=atom(idMailIcon)/>
<Element Layout=FillLayout() Padding=Rect(12,8,0,0)>
<Element Id=atom(mailcount) Class="ToolbarButtonItemCount" FontSize=rcint("msgr",20957)pt ContentAlign=middlecenter/>
</Element>
</Element>
</Button>
</*PlusSkin*>
The way you were doing it was very long winded, there's no need to duplicate the code for the entire button, just leave it out if you're hiding the button.
This doesn't mean that only an expert can skin, it just means that you need to have a bit of patience and troubleshoot a bit better!
The error is obviously within those 15-20 lines somewhere (as removing them removes the error)....so go through them with a fine-toothed comb and you'll find it.
It's even telling you exactly what the problem is, the SkinTrace does have the work for you!
If you're using an xml editor that has line numbers, just look down for line 131 character 12 and the error will be there