W3cubDocs

/Padrino

Module: Padrino::Mailer::Helpers

Overview

Helpers for defining and delivering email messages.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary

Instance Method Details

#deliver(mailer_name, message_name, *attributes) ⇒ Object

Delivers a mailer message email with the given attributes.

Examples:

deliver(:sample, :birthday, "Joey", 21)
deliver(:example, :message, "John")

Parameters:

  • mailer_name (Symbol) — The name of the mailer.
  • message_name (Symbol) — The name of the message to deliver.
  • attributes — The parameters to pass to the mailer.

See Also:

#email(mail_attributes = {}, &block) ⇒ Object

Delivers an email with the given mail attributes.

Examples:

email do
  to      @user.email
  from    "[email protected]"
  subject "Welcome to Awesomeness!"
  locals  :a => a, :b => b
  render  'path/to/my/template'
end

Parameters:

  • mail_attributes (Hash) (defaults to: {}) — The attributes for this message (to, from, subject, cc, bcc, body, etc).
  • block (Proc) — The block mail attributes for this message.

See Also:

© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Mailer/Helpers