wneessen / go-mail

📧 Easy to use, yet comprehensive library for sending mails with Go
https://go-mail.dev
MIT License
680 stars 48 forks source link

Implement io.Reader interface on msg #11

Closed wneessen closed 2 years ago

wneessen commented 2 years ago

I thought about using io.Copy for convenience reasons, such as dumping a message to log writer, but tbh this is not something I really need. I'm perfectly fine with current API =) However, as Msg now satisfies io.WriterTo it seems strange that you can't use it as an argument for widely used io.Copy. I think adding this makes sense.

Originally posted by @inliquid in https://github.com/wneessen/go-mail/discussions/3#discussioncomment-2827202