<NME> mailer.rb
<BEF> # encoding: utf-8

# mail("rango@project.org", "joe@doe.com", "Free VIAGRA") do
#   render "mails/spam.html"
# end
begin
  require "mail"
rescue LoadError
  raise "You have to install mail gem!"
end
  class Mailer
      Rango.logger.error("E-mail from #{caller[0]} can't be send due to refused connection to the SMTP server")
    end
  end
end

Rango::Controller.send(:include, Rango::Mailing)

<MSG> Mailer.mail

<DFF> @@ -11,6 +11,12 @@ module Rango
   class Mailer
     @@config = {smtp: ["localhost", 25]}
 
+    def self.mail(options = Hash.new)
+      self.new(options[:from]).tap do |mailer|
+        mailer.body = options[:body]
+      end
+    end
+
     attr_accessor :to, :to_alias
     attr_accessor :from, :from_alias
     attr_accessor :body, :subject

Mailer.mail