diff contact/forms.py @ 892:79a71b9d0a2a

Use Reply-To header when sending mail from other users. See issue #81.
author Brian Neal <bgneal@gmail.com>
date Mon, 16 Feb 2015 20:30:48 -0600
parents 38db6ec61af3
children 6ac56115e0a8
line wrap: on
line diff
--- a/contact/forms.py	Mon Feb 16 18:58:49 2015 -0600
+++ b/contact/forms.py	Mon Feb 16 20:30:48 2015 -0600
@@ -38,8 +38,11 @@
                     'site_name': site.name,
                     'user_name': self.cleaned_data['name'],
                     'user_email': self.cleaned_data['email'],
+                    'subject': self.cleaned_data['subject'],
                     'message': self.cleaned_data['message'],
                 })
 
         subject = site.name + ' Feedback: ' + self.cleaned_data['subject']
-        send_mail(subject, msg, self.cleaned_data['email'], self.recipient_list)
+        from_email = settings.GPP_NO_REPLY_EMAIL + '@' + site.domain
+        send_mail(subject, msg, from_email, self.recipient_list,
+                  reply_to=self.cleaned_data['email'])