Method: Utopia::Exceptions::Mailer#initialize

Defined in:
lib/utopia/exceptions/mailer.rb

#initialize(app, to: "postmaster", from: DEFAULT_FROM, subject: DEFAULT_SUBJECT, delivery_method: LOCAL_SMTP, dump_environment: false) ⇒ Mailer

Returns a new instance of Mailer.

Parameters:

  • to (String) (defaults to: "postmaster")

    The address to email error reports to.

  • from (String) (defaults to: DEFAULT_FROM)

    The from address for error reports.

  • subject (String) (defaults to: DEFAULT_SUBJECT)

    The subject template which can access attributes defined by #attributes_for.

  • delivery_method (Object) (defaults to: LOCAL_SMTP)

    The delivery method as required by the mail gem.

  • dump_environment (Boolean) (defaults to: false)

    Attach env as environment.yaml to the error report.



28
29
30
31
32
33
34
35
36
# File 'lib/utopia/exceptions/mailer.rb', line 28

def initialize(app, to: "postmaster", from: DEFAULT_FROM, subject: DEFAULT_SUBJECT, delivery_method: LOCAL_SMTP, dump_environment: false)
  @app = app
  
  @to = to
  @from = from
  @subject = subject
  @delivery_method = delivery_method
  @dump_environment = dump_environment
end