Class: MandrillMailer::MandrillTemplateJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/mandrill_mailer/mandrill_template_later.rb

Instance Method Summary collapse

Instance Method Details

#perform(template_name, template_content, message, async, ip_pool, send_at, mailer = 'MandrillMailer::TemplateMailer') ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/mandrill_mailer/mandrill_template_later.rb', line 6

def perform(template_name, template_content, message, async, ip_pool, send_at, mailer='MandrillMailer::TemplateMailer')
  mailer = mailer.constantize.new
  mailer.template_name = template_name
  mailer.template_content = template_content
  mailer.message = message
  mailer.async = async
  mailer.ip_pool = ip_pool
  mailer.send_at = send_at
  mailer.deliver_now
end