Commit 1be3ac88 authored by Robert Speicher's avatar Robert Speicher Committed by Douglas Barbosa Alexandre

Merge branch 'fix-plain-text-emails' into 'master'

Use #parts instead of #part to read all the parts of the Message.

Closes #26463

See merge request !8507
parent 59b46c66
...@@ -5,8 +5,8 @@ class EmailTemplateInterceptor ...@@ -5,8 +5,8 @@ class EmailTemplateInterceptor
def self.delivering_email(message) def self.delivering_email(message)
# Remove HTML part if HTML emails are disabled. # Remove HTML part if HTML emails are disabled.
unless current_application_settings.html_emails_enabled unless current_application_settings.html_emails_enabled
message.part.delete_if do |part| message.parts.delete_if do |part|
part.content_type.try(:start_with?, 'text/html') part.content_type.start_with?('text/html')
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment