Module: NoNotifierNeeded::Sender

Defined in:
lib/no_notifier_needed/sender.rb

Instance Method Summary collapse

Instance Method Details

#mcp(email_name, args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/no_notifier_needed/sender.rb', line 3

def mcp(email_name, args)
  @template = EmailTemplate.find_by_name(email_name)
  raise "Email Template name not found" if @template.nil?

  args_to_instance_vars(args)

  mail_is = mail(get_send_hash) do|format|
    format.html { render :inline => render_template_body_type(@template) }
  end

  return mail_is
end