go-message icon indicating copy to clipboard operation
go-message copied to clipboard

Optimize Entity.WriteTo

Open emersion opened this issue 5 years ago • 1 comments

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

emersion avatar Apr 25 '20 14:04 emersion

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.

emersion avatar Jun 16 '20 15:06 emersion