Sha256: 289f27d81966bdf9f76b184e1c597b8e4ae60f98a2f48185a0f30a3a3c24041b

Contents?: true

Size: 575 Bytes

Versions: 15

Compression:

Stored size: 575 Bytes

Contents

module PointlessFeedback
  class FeedbackMailer < ActionMailer::Base
    def feedback(message)
      @message = message

      mail(:to => to_emails, :subject => feedback_subject, :from => from_address)
    end

    private

    def from_address
      if PointlessFeedback.send_from_submitter
        @message.email_address
      else
        PointlessFeedback.from_email
      end
    end

    def to_emails
      Array(PointlessFeedback.to_emails)
    end

    def feedback_subject
      I18n.t('pointless_feedback.email.subject', :default => 'Feedback')
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pointless_feedback-4.1.5 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.1.4 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.1.3 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.1.2 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.1.1 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.1.0 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.6 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.5 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.3 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.2 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-3.0.2 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.1 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-3.0.0 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-4.0.0 app/mailers/pointless_feedback/feedback_mailer.rb
pointless_feedback-1.0.3 app/mailers/pointless_feedback/feedback_mailer.rb