Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/resend/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Mailer
cc bcc
from reply-to to subject mime-version
html text
content-type tags scheduled_at
content-type content-transfer-encoding tags scheduled_at
headers options
].freeze

Expand Down
9 changes: 9 additions & 0 deletions spec/railtie/mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,13 @@ class TestMailerWithDisplayName < TestMailer
body = @mailer.build_resend_params(message)
expect(body[:headers].keys).to eq(["custom-header2"])
end

it "filters content-transfer-encoding from custom headers" do
expect(Resend::Mailer::IGNORED_HEADERS).to include("content-transfer-encoding")

message = TestMailer.html_text_msg("test@example.org", "Test!")
body = @mailer.build_resend_params(message)
headers = body[:headers] || {}
expect(headers).not_to have_key("Content-Transfer-Encoding")
end
end