Sha256: f96d838807f3cab839db74a5462eab4c45d24bf6499d344ade7c121d5ce395f5

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

require "action_mailer/in_style/version"
require "action_mailer"

module ActionMailer
  module InStyle
    autoload :Processor, 'action_mailer/in_style/processor'
    autoload :Premailer, 'action_mailer/in_style/premailer'

    # delivering_email hook within Mail
    #
    # This is where the whole process kicks off.
    def self.delivering_email(message)
      # If the email contains a html part or is only html
      if message.html_part || (message.content_type =~ /text\/html/ && message)
        InStyle::Processor.inline!(message)
      end
    end
  end
end

ActionMailer::Base.register_interceptor(ActionMailer::InStyle)

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
actionmailer-instyle4-0.5.4 lib/action_mailer/in_style.rb
actionmailer-instyle-0.5.3 lib/action_mailer/in_style.rb
actionmailer-instyle-0.5.2 lib/action_mailer/in_style.rb
actionmailer-instyle-0.5.1 lib/action_mailer/in_style.rb