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
This commit is contained in:
parent
6c62482144
commit
c6ebe440da
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue