Subject: | E-mail body with Unicode characters truncated |
The length of the message body to be sent is calculated using the length function, but
that counts characters, not bytes. If the message body contains Unicode characters, the
character count is less than the byte count and the message ends up truncated. Maybe
it would be enough to “use bytes” before the call to length?