Class: Emailer

Inherits:
ActionMailer::Base
  • Object
show all
Includes:
UmlautConfigurable
Defined in:
app/mailers/emailer.rb

Instance Method Summary collapse

Methods included from UmlautConfigurable

set_default_configuration!

Instance Method Details

#citation(recipient, user_request, fulltexts, holdings) ⇒ Object


9
10
11
12
13
14
15
16
17
18
19
# File 'app/mailers/emailer.rb', line 9

def citation(recipient, user_request, fulltexts, holdings)
  @title  = find_good_title(user_request.referent)
  @fulltexts  = fulltexts
  @holdings  = holdings
  @user_request = user_request
  
  mail(:to => recipient, 
       :from => umlaut_config.from_email_addr, 
       :'Reply-to' => umlaut_config.from_email_addr,
       :subject => "#{umlaut_config.app_name} result: #{find_good_title(user_request.referent)}")
end

#short_citation(recipient, user_request, location, call_number) ⇒ Object


21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/mailers/emailer.rb', line 21

def short_citation(recipient, user_request, location, call_number)
  
 
  @title  = find_good_title(user_request.referent)
  @location  = location
  @call_number  = call_number
  @user_request = user_request
  
  mail(:to => recipient, 
       :from => umlaut_config.from_email_addr,
       :'Reply-to' => umlaut_config.from_email_addr, 
       :subject => "#{umlaut_config.app_name} result")

end