Skip to content

Commit e650ab5

Browse files
committed
send sponsor notifications from settings.SPONSORSHIP_NOTIFICATION_FROM_EMAIL
1 parent 76bb808 commit e650ab5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sponsors/models/notifications.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ def get_email_message(self, sponsorship, **kwargs):
4444
return
4545

4646
recipients = contacts.values_list("email", flat=True)
47-
return self.get_email(from_email=settings.DEFAULT_FROM_EMAIL, to=recipients,
48-
context={"sponsorship": sponsorship})
47+
return self.get_email(
48+
from_email=settings.SPONSORSHIP_NOTIFICATION_FROM_EMAIL,
49+
to=recipients,
50+
context={"sponsorship": sponsorship},
51+
)

sponsors/tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ def test_get_email_message(self):
757757
self.assertIsInstance(email, EmailMessage)
758758
self.assertEqual("Subject - Foo", email.subject)
759759
self.assertEqual("Hi Foo, how are you?", email.body)
760-
self.assertEqual(settings.DEFAULT_FROM_EMAIL, email.from_email)
760+
self.assertEqual(settings.SPONSORSHIP_NOTIFICATION_FROM_EMAIL, email.from_email)
761761
self.assertEqual(2, len(email.to))
762762
self.assertIn(self.contact.email, email.to)
763763
self.assertIn(manager.email, email.to)

0 commit comments

Comments
 (0)