mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Merge pull request #7866 from penpot/niwinz-staging-fix-emails
🐛 Change internal ordering on how email parts are assembled
This commit is contained in:
@@ -106,17 +106,17 @@
|
|||||||
(let [content-part (MimeBodyPart.)
|
(let [content-part (MimeBodyPart.)
|
||||||
alternative-mpart (MimeMultipart. "alternative")]
|
alternative-mpart (MimeMultipart. "alternative")]
|
||||||
|
|
||||||
|
(when-let [content (get body "text/plain")]
|
||||||
|
(let [text-part (MimeBodyPart.)]
|
||||||
|
(.setText text-part ^String content ^String charset)
|
||||||
|
(.addBodyPart alternative-mpart text-part)))
|
||||||
|
|
||||||
(when-let [content (get body "text/html")]
|
(when-let [content (get body "text/html")]
|
||||||
(let [html-part (MimeBodyPart.)]
|
(let [html-part (MimeBodyPart.)]
|
||||||
(.setContent html-part ^String content
|
(.setContent html-part ^String content
|
||||||
(str "text/html; charset=" charset))
|
(str "text/html; charset=" charset))
|
||||||
(.addBodyPart alternative-mpart html-part)))
|
(.addBodyPart alternative-mpart html-part)))
|
||||||
|
|
||||||
(when-let [content (get body "text/plain")]
|
|
||||||
(let [text-part (MimeBodyPart.)]
|
|
||||||
(.setText text-part ^String content ^String charset)
|
|
||||||
(.addBodyPart alternative-mpart text-part)))
|
|
||||||
|
|
||||||
(.setContent content-part alternative-mpart)
|
(.setContent content-part alternative-mpart)
|
||||||
(.addBodyPart mixed-mpart content-part))
|
(.addBodyPart mixed-mpart content-part))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user