module Roda::RodaPlugins::Mailer::RequestMethods

def mail(*args)

any arguments passed to the +mail+ or +sendmail+ Roda class methods.
the request. This yields any of the captures to the block, as well as
+mail+ or +sendmail+ methods) and the rest of the arguments match
only if the request method is MAIL (only set when using the Roda class
Similar to routing tree methods such as +get+ and +post+, this matches
def mail(*args)
  if @env["REQUEST_METHOD"] == "MAIL"
    # RODA4: Make terminal match the default
    send(roda_class.opts[:mailer][:terminal] ? :_verb : :if_match, args) do |*vs|
      yield(*(vs + @env['roda.mail_args']))
    end
  end
end