Sha256: bd09683d5440b49392204df423394a16ff1981ba2153abd5b054566b36b584f0
Contents?: true
Size: 858 Bytes
Versions: 36
Compression:
Stored size: 858 Bytes
Contents
module Merb module MailerMixin # Sends mail via a MailController (a tutorial can be found in the # MailController docs). # # ==== Parameters # klass<Class>:: The mailer class. # method<~to_s>:: The method to call on the mailer. # mail_params<Hash>:: # Mailing parameters, e.g. :to and :cc. See # Merb::MailController#dispatch_and_deliver for details. # send_params<Hash>:: # Params to send to the mailer. Defaults to the params of the current # controller. # # ==== Examples # # Send an email via the FooMailer's bar method. # send_mail FooMailer, :bar, :from => "foo@bar.com", :to => "baz@bat.com" def send_mail(klass, method, mail_params, send_params = nil) klass.new(send_params || params, self).dispatch_and_deliver(method, mail_params) end end end
Version data entries
36 entries across 36 versions & 2 rubygems