Class: Ecm::Contact::Request

Inherits:
MailForm::Base
  • Object
show all
Defined in:
app/mail_forms/ecm/contact/request.rb

Instance Method Summary collapse

Instance Method Details

#headersObject

Declare the e-mail headers. It accepts anything the mail method in ActionMailer accepts.



18
19
20
21
22
23
24
25
# File 'app/mail_forms/ecm/contact/request.rb', line 18

def headers
  {
    subject: proc { I18n.t('ecm.contact.request.subject', application_name: Rails.application.class.to_s.split('::').first) }.call,
    # :to => I18n.t('ecm.contact.request.recipients'),
    to: Ecm::Contact::Configuration.recipients[Rails.env],
    from: %("#{name}" <#{email}>)
  }
end