Closed dmitam closed 1 year ago
Hi @dmitam,
thanks for opening this report. You can actually already do the requested feature with go-mail right now.
Embed your image file like this:
m := mail.NewMsg()
[...]
m.EmbedFile(fn, mail.WithFileName("my_logo.png"))
and in the mail body, then refer to the filename via the oid:
keyword:
<img src="cid:my_logo.png" alt="My great Logo" width="150px"/>
The mail client will then inline the logo as expected directly into the mail's html context.
Thank you! It helped
Is your feature request related to a problem? Please describe.
I need to set Content-ID to use attached image inside the html content. I tried to SetGenHeader on message but it affects all the parts. Seems to be related with #107
Describe the solution you'd like
Another option WithContentId or WithHeader in EmbedFile or AttachFile
Describe alternatives you've considered
No response
Additional context
No response