Sha256: bcd03c40a31e762625e0446567ec0bebbc68fd132520ff0bd944462eeb0d585b

Contents?: true

Size: 802 Bytes

Versions: 12

Compression:

Stored size: 802 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.company_name} <#{Setting.first.contact_email}>"
    reply_to = "#{@contact.sender_name} <#{@contact.sender_email}>"
    mail  to: recipient,  
          from: "#{Setting.first.site_name} <deploy@pragmaticyoga.org>",
          reply_to: reply_to,
          subject: "Message from #{@contact.sender_name} via #{Setting.first.site_name} web site"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tkh_content-0.3.1 app/mailers/contact_mailer.rb
tkh_content-0.3 app/mailers/contact_mailer.rb
tkh_content-0.2.1 app/mailers/contact_mailer.rb
tkh_content-0.2 app/mailers/contact_mailer.rb
tkh_content-0.1.15 app/mailers/contact_mailer.rb
tkh_content-0.1.14 app/mailers/contact_mailer.rb
tkh_content-0.1.13 app/mailers/contact_mailer.rb
tkh_content-0.1.12 app/mailers/contact_mailer.rb
tkh_content-0.1.11 app/mailers/contact_mailer.rb
tkh_content-0.1.10 app/mailers/contact_mailer.rb
tkh_content-0.1.9.3 app/mailers/contact_mailer.rb
tkh_content-0.1.9.2 app/mailers/contact_mailer.rb