module Roda::RodaPlugins::ErrorEmail

def self.configure(app, opts=OPTS)

Set default opts for plugin. See ErrorEmail module RDoc for options.
def self.configure(app, opts=OPTS)
  email_opts = app.opts[:error_email] ||= DEFAULTS
  email_opts = email_opts.merge(opts)
  email_opts[:headers] = email_opts[:headers].dup
  unless email_opts[:to] && email_opts[:from]
    raise RodaError, "must provide :to and :from options to error_email plugin"
  end
  app.opts[:error_email] = email_opts
  app.opts[:error_email][:headers].freeze
  app.opts[:error_email].freeze
end