aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-06-01 12:45:30 +0100
committerLouise Crow <louise.crow@gmail.com>2015-06-08 12:41:37 +0100
commitad557e2ff04dd6a971ab51fe479745f357e81016 (patch)
treee1e3c94cf5f923b338af3731eedf0ac161642275 /app
parentd6a1f042d64be5c8906aa4af0e0a4c9c6dd08bfb (diff)
Use address_from_name_and_email to correctly format from field.
Prior to this, a name with commas in it plus email address would have been treated as several separate addresses, some of which would have just consisted of the bits of the name between the commas, and would have been invalid.
Diffstat (limited to 'app')
-rw-r--r--app/mailers/contact_mailer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/mailers/contact_mailer.rb b/app/mailers/contact_mailer.rb
index 7c48bfd4b..58e036d3b 100644
--- a/app/mailers/contact_mailer.rb
+++ b/app/mailers/contact_mailer.rb
@@ -10,7 +10,7 @@ class ContactMailer < ApplicationMailer
def to_admin_message(name, email, subject, message, logged_in_user, last_request, last_body)
@message, @logged_in_user, @last_request, @last_body = message, logged_in_user, last_request, last_body
- mail(:from => "#{name} <#{email}>",
+ mail(:from => MailHandler.address_from_name_and_email(name, email),
:to => contact_from_name_and_email,
:subject => subject)
end