]> git.parisson.com Git - django-postman.git/commitdiff
fix recipient
authoryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 12:10:43 +0000 (14:10 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 12:10:43 +0000 (14:10 +0200)
postman/utils.py

index 9359bc524f47ed4cc688f482aa1f6fd8ab3deeb8..18a2877bd3aa286458896ac75e21341be440ca8f 100644 (file)
@@ -64,7 +64,7 @@ def format_subject(subject):
 def email(subject_template, message_template, recipient_list, object, action=None):
     """Compose and send an email."""
     site = Site.objects.get_current()
-    ctx_dict = {'site': site, 'object': object, 'action': action, 'usr': object.sender}
+    ctx_dict = {'site': site, 'object': object, 'action': action, 'usr': object.recipient}
     subject = render_to_string(subject_template, ctx_dict)
     # Email subject *must not* contain newlines
     subject = ''.join(subject.splitlines())