Is your feature request related to a problem? Please describe.
In this discussion: https://github.com/wneessen/go-mail/discussions/27#discussioncomment-3055427 I was made aware, that users might want to embed/attach files via embed.FS - meaning files that are directly shipped in the go binary. This is currently possible via opening the embed.FS file and then using EmbedReader. We might consider adding direct embed.FS support for ease of use.
Describe the solution you'd like
I see two possible solutions:
Add two new EmbedEmbedFSFile() and AttachEmbedFSFile() methods
Add a new FileOption that hands over the embed.FS to either EmbedFile() and AttachFile() methods that then decide from where to fetch the file.
Is your feature request related to a problem? Please describe.
In this discussion: https://github.com/wneessen/go-mail/discussions/27#discussioncomment-3055427 I was made aware, that users might want to embed/attach files via embed.FS - meaning files that are directly shipped in the go binary. This is currently possible via opening the embed.FS file and then using
EmbedReader
. We might consider adding direct embed.FS support for ease of use.Describe the solution you'd like
I see two possible solutions:
EmbedEmbedFSFile()
andAttachEmbedFSFile()
methodsFileOption
that hands over the embed.FS to eitherEmbedFile()
andAttachFile()
methods that then decide from where to fetch the file.Describe alternatives you've considered
No response
Additional context
No response