Sha256: 5ff76c824b514883d3909308a19a3744e7e6172530a81268b78dca37735ab7c8

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

module Mail
  module Notify
    class Mailer < ActionMailer::Base
      def view_mail(template_id, headers)
        raise ArgumentError, "You must specify a template ID" if template_id.blank?

        mail(headers.merge(template_id: template_id))
      end

      def template_mail(template_id, headers)
        raise ArgumentError, "You must specify a template ID" if template_id.blank?

        mail(headers.merge(body: "", subject: "", template_id: template_id))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mail-notify-1.0.4 lib/mail/notify/mailer.rb
mail-notify-1.0.3 lib/mail/notify/mailer.rb
mail-notify-1.0.2 lib/mail/notify/mailer.rb
mail-notify-1.0.1 lib/mail/notify/mailer.rb