UTF-8 encoding of "subject", "from" and "to" headers

Apply base64 encoding on "subject", "from" and "to" headers to correctly encode UTF-8 characters.