Module: Mail::Gpg::Rails::ActionMailerPatch

Extended by:
ActiveSupport::Concern
Defined in:
lib/mail/gpg/rails/action_mailer_base_patch.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#mail_with_gpg(headers = {}, &block) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/mail/gpg/rails/action_mailer_base_patch.rb', line 17

def mail_with_gpg(headers = {}, &block)
  headers = headers.dup
  gpg_options = headers.delete :gpg
  mail_without_gpg(headers, &block).tap do |m|
    if gpg_options
      m.gpg gpg_options
    end
  end
end