go-message
go-message copied to clipboard
Optimize Entity.WriteTo
When the charset and Content-Transfer-Encoding haven't been modfiied, we can avoid decoding and re-encoding the entity's body. We can just pipe the original message's body.
Related to https://github.com/emersion/go-message/issues/84
On that note, maybe we should introduce a WriterTo interface. This could allow e.g. go-smtp to use 8-bit encodings if the SMTP server supports 8BITMIME.