Class: AuthentasaurusEmailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/models/authentasaurus_emailer.rb

Instance Method Summary collapse

Instance Method Details

#invitation_mail(email, token, sent_at = Time.now) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'app/models/authentasaurus_emailer.rb', line 22

def invitation_mail(email, token, sent_at = Time.now)
  subject   AUTHENTASAURUS[:modules][:invitable][:mail_subject]
  recipients email
  from       AUTHENTASAURUS[:modules][:invitable][:mail_from]
  sent_on    sent_at
  
  body       :token => token
  content_type "text/html"
end

#recovery_mail(user, token, sent_at = Time.now) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'app/models/authentasaurus_emailer.rb', line 12

def recovery_mail(user, token, sent_at = Time.now)
  subject    AUTHENTASAURUS[:modules][:recoverable][:mail_subject]
  recipients user.email
  from       AUTHENTASAURUS[:modules][:recoverable][:mail_from] # dont forget to change me
  sent_on    sent_at
  
  body       :name => user.name, :token => token
  content_type "text/html"
end

#validation_mail(name, email, validation_code, sent_at = Time.now) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'app/models/authentasaurus_emailer.rb', line 2

def validation_mail(name, email, validation_code, sent_at = Time.now)
  subject    AUTHENTASAURUS[:modules][:validatable][:mail_subject]
  recipients email
  from       AUTHENTASAURUS[:modules][:validatable][:mail_from]
  sent_on    sent_at
  
  body       :name => name, :vcode => validation_code
  content_type "text/html"
end