Fix 'Content-Length mismatch' error

I get errors like this: 
`[ 'SPAMD/1.0 76 Bad header line: (Content-Length mismatch: Expected 628 bytes, got 632 bytes)' ]` 
when the message contains multi-byte characters. String.prototype.length doesn't give the actual byte length