Skip to content

Commit

Permalink
remove post owner email from reply to on notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
sirodoht committed Oct 9, 2023
1 parent db39a59 commit 20b38c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion main/management/commands/process_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def get_email(post, notification):
body=body,
from_email=f"{blog_title} <{post.owner.username}@{settings.EMAIL_FROM_HOST}>",
to=[notification.email],
reply_to=[post.owner.email],
headers={
"X-PM-Message-Stream": "newsletters",
"List-Unsubscribe": unsubscribe_url,
Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_command(self):

# email headers
self.assertEqual(mail.outbox[0].to, [self.notification.email])
self.assertEqual(mail.outbox[0].reply_to, [self.user.email])
self.assertEqual(mail.outbox[0].reply_to, [])
self.assertEqual(
mail.outbox[0].from_email,
f"{self.user.username} <{self.user.username}@{settings.EMAIL_FROM_HOST}>",
Expand Down

0 comments on commit 20b38c3

Please sign in to comment.