Commit c6ebe440 authored by Ruben Davila's avatar Ruben Davila

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

Looks like I was accidentally using #part which was adding an extra
empty Mime section
parent 6c624821
......@@ -5,8 +5,8 @@ class EmailTemplateInterceptor
def self.delivering_email(message)
# Remove HTML part if HTML emails are disabled.
unless current_application_settings.html_emails_enabled
message.part.delete_if do |part|
part.content_type.try(:start_with?, 'text/html')
message.parts.delete_if do |part|
part.content_type.start_with?('text/html')
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