Class: Refinery::Inquiries::InquiryMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/refinery/inquiries/inquiry_mailer.rb

Instance Method Summary collapse

Instance Method Details

#confirmation(inquiry, request) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'app/mailers/refinery/inquiries/inquiry_mailer.rb', line 5

def confirmation(inquiry, request)
  @inquiry = inquiry
  mail :subject   => Refinery::Inquiries::Setting.confirmation_subject(Globalize.locale),
       :to        => inquiry.email,
       :from      => ::I18n.t('from_name',
                              :scope => 'refinery.inquiries.config',
                              :site_name => Refinery::Core.site_name,
                              :name => @inquiry.name) + " <#{Refinery::Inquiries.from_name}@#{request.domain}>",
       :reply_to  => Refinery::Inquiries::Setting.notification_recipients.split(',').first
end

#notification(inquiry, request) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'app/mailers/refinery/inquiries/inquiry_mailer.rb', line 16

def notification(inquiry, request)
  @inquiry = inquiry
  mail :subject   => Refinery::Inquiries::Setting.notification_subject,
       :to        => Refinery::Inquiries::Setting.notification_recipients,
       :from      => ::I18n.t('from_name',
                              :scope => 'refinery.inquiries.config',
                              :site_name => Refinery::Core.site_name,
                              :name => @inquiry.name) + " <#{Refinery::Inquiries.from_name}@#{request.domain}>",
       :reply_to  => inquiry.email
end