mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 21:34:50 +00:00
Followup 96a0781bc181fdc4bda856bfb90b03ce55e342cf When sending emails where secure uploads is enabled and secure_uploads_allow_embed_images_in_emails is true, we attach the images to the email, and we do some munging with the final email so the structure of the MIME parts looks like this: ``` multipart/mixed multipart/alternative text/plain text/html image/jpeg image/jpeg image/png ``` However, we were not specifying the `boundary` of the `multipart/mixed` main content-type of the email, so sometimes the email would come through appearing to have an empty body with the entire thing attached as one attachment, and some mail parsers considered the entire email as the "epilogue" and/or "preamble". This commit fixes the issue by specifying the boundary in the content-type header per https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html