Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
891:24fc302f9076 | 892:79a71b9d0a2a |
---|---|
36 | 36 |
37 msg = render_to_string('contact/contact_email.txt', { | 37 msg = render_to_string('contact/contact_email.txt', { |
38 'site_name': site.name, | 38 'site_name': site.name, |
39 'user_name': self.cleaned_data['name'], | 39 'user_name': self.cleaned_data['name'], |
40 'user_email': self.cleaned_data['email'], | 40 'user_email': self.cleaned_data['email'], |
41 'subject': self.cleaned_data['subject'], | |
41 'message': self.cleaned_data['message'], | 42 'message': self.cleaned_data['message'], |
42 }) | 43 }) |
43 | 44 |
44 subject = site.name + ' Feedback: ' + self.cleaned_data['subject'] | 45 subject = site.name + ' Feedback: ' + self.cleaned_data['subject'] |
45 send_mail(subject, msg, self.cleaned_data['email'], self.recipient_list) | 46 from_email = settings.GPP_NO_REPLY_EMAIL + '@' + site.domain |
47 send_mail(subject, msg, from_email, self.recipient_list, | |
48 reply_to=self.cleaned_data['email']) |