You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The inline image example from the README (let [content-id (mime-id/get-random)] (tarayo/send! conn { ... {:content (io/file "test/resources/image.png") :id content-id}]})))
Also the content id now contains double angle brackets.
To fix this issue, either the ID should not be out into angle brackets or the Content-ID is inserted without putting it into angle brackets. I would prefer the first option to keep backwards compatibilty and also not to have the implicit assumption, that all supplied content ids will be put into angle brackets.
The text was updated successfully, but these errors were encountered:
tarayo.mail.mime.id/get-random is a function for the Message-ID header, so the example used for Content-ID was wrong to begin with.
Thus I can not merge #15 because changes in the PR could affect Message-ID.
Is it enought to use random-uuid? How do you think?
e.g. (let [content-id (str (random-uuid))] ...)
The inline image example from the README
(let [content-id (mime-id/get-random)] (tarayo/send! conn { ... {:content (io/file "test/resources/image.png") :id content-id}]})))
does not work:
(mime-id/get-random)
generates an ID with angle brackets (e.g.<[email protected]>
),but when generating the message, the content ID is again put into angle brackets here:
https://github.com/toyokumo/tarayo/blame/master/src/tarayo/mail/mime/multipart/body.clj#L88=
This results in the following invalid HTML img tag and the img not being displayed (at least in Thunderbird):
`------=_Part_2_1478985609.1649756558122
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
world
------=_Part_2_1478985609.1649756558122
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename=logo.png
Content-ID: <[email protected]>`
Also the content id now contains double angle brackets.
To fix this issue, either the ID should not be out into angle brackets or the Content-ID is inserted without putting it into angle brackets. I would prefer the first option to keep backwards compatibilty and also not to have the implicit assumption, that all supplied content ids will be put into angle brackets.
The text was updated successfully, but these errors were encountered: