public
Fork of halorgium/mephisto
Description: A refactored Mephisto that has multiple spam detection engines.
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/francois/mephisto.git
mephisto / app / models / user_mailer.rb
100644 21 lines (18 sloc) 0.562 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class UserMailer < ActionMailer::Base
  include ActionController::UrlWriter
  @@mail_from = nil
  mattr_accessor :mail_from
 
  def forgot_password(user)
    setup_email(user)
    @subject += 'Request to change your password'
    @body[:url] = url_for :controller => 'account', :action => 'activate', :id => user.token
  end
 
  protected
    def setup_email(user)
      @recipients = "#{user.email}"
      @from = "#{@@mail_from}"
      @subject = "#{default_url_options[:host]}: "
      @sent_on = Time.now
      @body[:user] = user
    end
end