class Mailer require 'mail' def initialize(username, password) @username @password end def send(to_, from_, subject_, body_) options = {:address => "smtp.gmail.com", :port => 587, :user_name => 'jon@ovex.io', :password => 'aewowzkiusgrdcxx', :authentication => 'plain', :enable_starttls_auto => true} Mail.defaults do delivery_method :smtp, options end Mail.deliver do to to_ from from_ subject subject_ text_part do content_type 'text/plain' body body_ end html_part do content_type 'text/html; charset=UTF-8' body File.read('email_footer.html') end end end end