Module: Merb::MailerMixin

Defined in:
merb-mailer/lib/merb-mailer/mailer_mixin.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) send_mail(klass, method, mail_params, send_params = nil)

Sends mail via a Merb::MailController.

Examples:

# Send an email via the FooMailer's bar method.
send_mail FooMailer, :bar, :from => "foo@bar.com", :to => "baz@bat.com"


16
17
18
# File 'merb-mailer/lib/merb-mailer/mailer_mixin.rb', line 16

def send_mail(klass, method, mail_params, send_params = nil)
  klass.new(send_params || params, self).dispatch_and_deliver(method, mail_params)
end