Module: Hanami::Mailer::ClassMethods
- Defined in:
- lib/hanami/mailer.rb
Overview
Instance Method Summary collapse
-
#deliver(locals = {}) ⇒ Object
Delivers a multipart email message.
Instance Method Details
#deliver(locals = {}) ⇒ Object
Delivers a multipart email message.
When a mailer defines a html
and txt
template, they are both delivered.
In order to selectively deliver only one of the two templates, use Signup::Welcome.deliver(format: :txt)
All the given locals, excepted the reserved ones (:format
and charset
), are available as rendering context for the templates.
197 198 199 |
# File 'lib/hanami/mailer.rb', line 197 def deliver(locals = {}) new(locals).deliver end |