beam-community / bamboo

Testable, composable, and adapter based Elixir email library for devs that love piping.
https://hex.pm/packages/bamboo
MIT License
1.9k stars 343 forks source link

Add arbitrary header overrides for attachments #631

Open jarrodmoldrich opened 2 years ago

jarrodmoldrich commented 2 years ago

This allows bamboo adapters to be accept overriding headers for special use cases. Updates to those adapters would be required to use this functionality.

For e.g., in the specific use-case of adding inlined attachments, some special case headers are required. Now it's possible to add X-Attachment-Id and override the Content-Disposition header with inline to permit the proper display of inlined content, without an email client showing them as explicit attachments for the user to download.

Closes #502 #430

Related PRs: https://github.com/kalys/bamboo_ses/pull/43 https://github.com/DockYard/elixir-mail/pull/137