module Roda::RodaPlugins::Mailer::ClassMethods
def mail(path, *args)
and arguments. You can further manipulate the returned mail object before
Return a Mail::Message instance for the email for the given request path
def mail(path, *args) mail = ::Mail.new catch(:no_mail) do unless mail.equal?(new(PATH_INFO=>path, SCRIPT_NAME=>EMPTY_STRING, REQUEST_METHOD=>MAIL, RACK_INPUT=>StringIO.new, RODA_MAIL=>mail, RODA_MAIL_ARGS=>args).call(&route_block)) raise Error, "route did not return mail instance for #{path.inspect}, #{args.inspect}" end mail end end