Closed ivanjaros closed 3 years ago
Just use
e := email.NewEmail()
...
at := e.Attach(buffer, "img.png", "image/png")
at.HTMLRelated = true
...
With a recent change #135 it is being marked as inline. In the HTML part you can reference the image using
<img src="cid:img.png"/>
.
See email_test.go
: TestEmailWithHTMLAttachments()
.
<img src="cid:img.png"/>
is what i was asking about.
The assets have this flag "related to html" which causes them to be treated as email attachments or as inline assets. But I am not sure how I am supposed to use the inline assets in the html body for example? Any examples?