Sha256: 97d5ed7f921115cd5be867e0eb6fe9ab946f662dafe9ed8b7143278ee7718f37

Contents?: true

Size: 917 Bytes

Versions: 9

Compression:

Stored size: 917 Bytes

Contents

class ContactMailer < ActionMailer::Base

  # This feature has been suspended. It's meant to be replaced by an admin daily digest.

  # 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

9 entries across 9 versions & 1 rubygems

Version Path
tkh_mailing_list-0.12 app/mailers/contact_mailer.rb
tkh_mailing_list-0.11.3 app/mailers/contact_mailer.rb
tkh_mailing_list-0.11.2 app/mailers/contact_mailer.rb
tkh_mailing_list-0.11.1.1 app/mailers/contact_mailer.rb
tkh_mailing_list-0.11.1 app/mailers/contact_mailer.rb
tkh_mailing_list-0.11 app/mailers/contact_mailer.rb
tkh_mailing_list-0.10.10 app/mailers/contact_mailer.rb
tkh_mailing_list-0.10.9.1 app/mailers/contact_mailer.rb
tkh_mailing_list-0.10.9 app/mailers/contact_mailer.rb