Closed suntong closed 7 years ago
Hmm, if backward compatibility is paramount, then I can add a new function, say Embeding
that takes the above form.
Better not to do that at the lib side, but client side instead, because gomail
has to be used programmatically anyway.
Can gomail supports embedding a lot of images?
From https://godoc.org/gopkg.in/gomail.v2#Message.Embed
it seems that gomail only support embedding one image.
To embed a lot of them, there are still lots of extra manual works to make it works, i.e., you have to specify where shall those emails appear, both in the Text portion and the HTML portion. But all these can be dealt with programmatically, to free people from such tedious manual work.
I'm proposing,
func (m *Message) Embed(filename ...string) string string
the two string returns are Text and HTML content for such embeds the images. For e.g., for single image,
so on and so forth.
Would that be OK? If I submit a patch, would it be accepted?