discourse/lib/email
Martin Brennan a128ce5c4c
FIX: Missing multipart/mixed boundary on emails (#27599)
Followup 96a0781bc1

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
2024-06-25 13:43:10 +10:00
..
authentication_results.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
build_email_helper.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
cleaner.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00
message_builder.rb DEV: Pass recipient email address to message_builder modifiers (#27308) 2024-06-04 08:00:30 -05:00
message_id_service.rb DEV: Remove old TODOs for message-id formats (#27196) 2024-05-28 13:57:09 +10:00
poller.rb FEATURE: Add hooks for email poller plugins (#21384) 2023-06-26 13:16:03 +08:00
processor.rb FIX: Prevent Email Processor errors when mail is blank or nil (#21292) 2023-05-18 10:39:37 +08:00
receiver.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
renderer.rb DEV: Add apply_modifier in Email::Renderer for html modifications (#25205) 2024-01-12 09:14:55 -06:00
sender.rb FIX: Missing multipart/mixed boundary on emails (#27599) 2024-06-25 13:43:10 +10:00
styles.rb DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
validator.rb DEV: Apply syntax_tree formatting to lib/* 2023-01-09 12:10:19 +00:00