Sha256: 0e4bd3d02f825d0245d00fbc8ae093054501c5a5c2b9f4d521b57be449b83fb5

Contents?: true

Size: 830 Bytes

Versions: 17

Compression:

Stored size: 830 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@ohlalaweb.pragmaticyoga.org>",
          reply_to: reply_to,
          subject: "Message from #{@contact.sender_name} via #{Setting.first.try(:site_name)} web site"
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tkh_content-0.9.10 app/mailers/contact_mailer.rb
tkh_content-0.9.9 app/mailers/contact_mailer.rb
tkh_content-0.9.8 app/mailers/contact_mailer.rb
tkh_content-0.9.7 app/mailers/contact_mailer.rb
tkh_content-0.9.6 app/mailers/contact_mailer.rb
tkh_content-0.9.5 app/mailers/contact_mailer.rb
tkh_content-0.9.4 app/mailers/contact_mailer.rb
tkh_content-0.9.3 app/mailers/contact_mailer.rb
tkh_content-0.9.2 app/mailers/contact_mailer.rb
tkh_content-0.4.7 app/mailers/contact_mailer.rb
tkh_content-0.9.1 app/mailers/contact_mailer.rb
tkh_content-0.9 app/mailers/contact_mailer.rb
tkh_content-0.4.6 app/mailers/contact_mailer.rb
tkh_content-0.4.5 app/mailers/contact_mailer.rb
tkh_content-0.4.4 app/mailers/contact_mailer.rb
tkh_content-0.4.3 app/mailers/contact_mailer.rb
tkh_content-0.4.2 app/mailers/contact_mailer.rb