Class: PostOffice
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- PostOffice
- Defined in:
- app/mailers/post_office.rb
Class Method Summary collapse
Instance Method Summary collapse
- #activation_needed_email(user) ⇒ Object
- #activation_success_email(user) ⇒ Object
- #contact_confirmation(contact) ⇒ Object
- #contact_request(contact) ⇒ Object
- #default_recipient ⇒ Object
- #password_reset_instructions(user) ⇒ Object
Class Method Details
.default_recipient ⇒ Object
35 36 37 |
# File 'app/mailers/post_office.rb', line 35 def self.default_recipient self.new.default_recipient end |
Instance Method Details
#activation_needed_email(user) ⇒ Object
21 22 23 24 |
# File 'app/mailers/post_office.rb', line 21 def activation_needed_email(user) @user = user mail(:to => default_recipient, :subject => "User #{@user.username} is awaiting approval.", :content_type => "text/html") end |
#activation_success_email(user) ⇒ Object
26 27 28 29 |
# File 'app/mailers/post_office.rb', line 26 def activation_success_email(user) @user = user mail(:to => "#{user.username} <#{user.email}>", :subject => "Your Landmark Title account has been approved.", :content_type => "text/html") end |
#contact_confirmation(contact) ⇒ Object
5 6 7 8 |
# File 'app/mailers/post_office.rb', line 5 def contact_confirmation(contact) @contact = contact mail(:to => "#{contact.name} <#{contact.email}>", :subject => "Your contact request has been sent.") end |
#contact_request(contact) ⇒ Object
10 11 12 13 |
# File 'app/mailers/post_office.rb', line 10 def contact_request(contact) @contact = contact mail(:to => default_recipient, :subject => "New contact request has been received.") end |
#default_recipient ⇒ Object
31 32 33 |
# File 'app/mailers/post_office.rb', line 31 def default_recipient Dust.site_wides.contact_info.default_recipient || "[email protected]" end |
#password_reset_instructions(user) ⇒ Object
15 16 17 18 19 |
# File 'app/mailers/post_office.rb', line 15 def password_reset_instructions(user) @user = user @edit_password_reset_url = edit_password_reset_url(user.perishable_token) mail(:to => "#{user.username} <#{user.email}>", :subject => "Password Reset Instructions", :content_type => "text/html") end |