Sha256: 535c382b9757fc2aa704d842d58d54085ce09dfd695dcf7a8ac8eaf78978a980

Contents?: true

Size: 409 Bytes

Versions: 5

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

# Copyright (c) 2008 - 2018, 2020, 2022, 2024 Peter H. Boling of RailsBling.com
# Released under the MIT license
require "mail"

# Cribbed from email_spec gem
module SanitizeEmail::MailExt
  def default_part
    @default_part ||= html_part || text_part || self
  end

  def default_part_body
    default_part.body
  end
end

Mail::Message.send(:include, SanitizeEmail::MailExt)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sanitize_email-2.0.10 lib/sanitize_email/mail_ext.rb
sanitize_email-2.0.9 lib/sanitize_email/mail_ext.rb
sanitize_email-2.0.8 lib/sanitize_email/mail_ext.rb
sanitize_email-2.0.7 lib/sanitize_email/mail_ext.rb
sanitize_email-2.0.6 lib/sanitize_email/mail_ext.rb