go-gomail / gomail

The best way to send emails in Go.
MIT License
4.3k stars 570 forks source link

Create attachment using io.Reader or io.ReadCloser #145

Closed kravemir closed 4 years ago

kravemir commented 4 years ago

gomail provides function to add attachment using filename:

func (m *Message) Attach(filename string, settings ...FileSetting)

However, this is very much limited to attachments from filesystem, not allowing other attachment content providers.

It would be useful, if it would be possible to add an attachment from:

Personally, I would prefer io.ReadCloser, which (in combination with ioutil.NopCloser) would create a versatile API covering the most of the use-cases.

kravemir commented 4 years ago

Closing, as the project is unmaintained, mentioned in: #142, #104, and #108.