Skip to content

Commit

Permalink
Send plain text emails properly
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoprietog committed Dec 19, 2023
1 parent 79e7c56 commit d8977d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mailchannels_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def deliver!(mail)
bcc: mail.bcc_addresses.map { |address| { email: address.address, name: address.name }.compact }.presence,
reply_to: (mail.header["Reply-To"]&.element&.addresses || []).map { |address| { email: address.address, name: address.name }.compact }.first
}.compact],
content: mail.parts.map { |part| { type: part.content_type, value: part.decoded } }
content: mail.multipart? ? mail.parts.map { |part| { type: part.content_type, value: part.decoded } } : [{ type: mail.content_type, value: mail.decoded }]
}
send_email(body)
end
Expand Down

0 comments on commit d8977d5

Please sign in to comment.