Class: ContactForm
- Inherits:
-
MailForm::Base
- Object
- MailForm::Base
- ContactForm
- Defined in:
- app/models/contact_form.rb
Overview
Generic contact form class. If changes are needed, then a new version should be created in the theme’s models folder
Instance Method Summary collapse
-
#headers ⇒ Object
for a contact form, the “from” address should be a valid email address within the domain that is doing the actual sending, instead of the contacter’s address.
Instance Method Details
#headers ⇒ Object
for a contact form, the “from” address should be a valid email address within the domain that is doing the actual sending, instead of the contacter’s address. This important for services like Sparkpost or Mandrill, that checks the validity of the sending domain.
21 22 23 24 25 26 27 |
# File 'app/models/contact_form.rb', line 21 def headers { subject: "#{I18n.t('cms.contact_form.subject_prefix')}: #{reason}: #{subject}" , to: Account.current.preferred_support_email, from: Account.current.preferred_support_email, reply_to: %("#{name}" <#{email}>) } end |