Skip to content

Commit

Permalink
Override Hyrax mailer to inject tenant name into contact form submiss…
Browse files Browse the repository at this point in the history
…ions

Fixes #1230
  • Loading branch information
mjgiarlo committed Jun 21, 2017
1 parent 982cfd0 commit f909249
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/mailers/hyrax/contact_mailer.rb
@@ -0,0 +1,13 @@
module Hyrax
# Mailer for contacting the administrator
class ContactMailer < HykuMailer
def contact(contact_form)
@contact_form = contact_form
# Check for spam
return if @contact_form.spam?
headers = @contact_form.headers.dup
headers[:subject] << " [#{host_for_tenant}]"
mail(headers)
end
end
end

0 comments on commit f909249

Please sign in to comment.