Open wshaman opened 4 years ago
Nice idea, but I think it would be better to reuse the existing (appendFile) so that no dupplication here.
It means changing appendFile
signature and filename
would be an io.Reader
(instead of string
), and Attach(
method would be responsible for converting filename string
to io.Reader
by opening the file.
What do you think ? :)
@ahuret I have a file URL on a cloud server I want to attach to a mail. How do I implement this?
Short: Add io.Reader as attachment Motivation: Using any cloud file storage (s3 in my case) you have to
We can reduce amount of conversions and keep code more straight-forward