Sha256: 8f98a4450eb3893e025aedd50a4473226f4c187e3746e71104591b8f57264ba6

Contents?: true

Size: 827 Bytes

Versions: 14

Compression:

Stored size: 827 Bytes

Contents

class ContactMailer < ActionMailer::Base

  # default :from => "info@yoga.lu"

  # Subject can be set in your I18n file at config/locales/en.yml
  # with the following lookup:
  #
  #   en.user_mailer.password_reset.subject
  #
  def message_from_contact_form(contact)
    @contact = contact
    # FIXME - only the email addresses show up. not the names :-(
    # TODO - what do to if contact_email is not set?
    recipient = "#{Setting.first.try(:company_name)} <#{Setting.first.try(:contact_email)}>"
    reply_to = "#{@contact.sender_name} <#{@contact.sender_email}>"
    mail  to: recipient,
          from: "#{Setting.first.site_name} <deploy@mailcenter.tenthousandhours.eu>",
          reply_to: reply_to,
          subject: "Message from #{@contact.sender_name} via #{Setting.first.try(:site_name)} web site"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
tkh_content-0.10.3 app/mailers/contact_mailer.rb
tkh_content-0.10.2 app/mailers/contact_mailer.rb
tkh_content-0.10.1 app/mailers/contact_mailer.rb
tkh_content-0.10 app/mailers/contact_mailer.rb
tkh_content-0.9.20 app/mailers/contact_mailer.rb
tkh_content-0.9.19 app/mailers/contact_mailer.rb
tkh_content-0.9.18 app/mailers/contact_mailer.rb
tkh_content-0.9.17 app/mailers/contact_mailer.rb
tkh_content-0.9.16 app/mailers/contact_mailer.rb
tkh_content-0.9.15 app/mailers/contact_mailer.rb
tkh_content-0.9.14 app/mailers/contact_mailer.rb
tkh_content-0.9.13 app/mailers/contact_mailer.rb
tkh_content-0.9.12 app/mailers/contact_mailer.rb
tkh_content-0.9.11 app/mailers/contact_mailer.rb