summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yaksh/send_emails.py2
-rw-r--r--yaksh/test_views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/send_emails.py b/yaksh/send_emails.py
index ae49f23..4c9a7dc 100644
--- a/yaksh/send_emails.py
+++ b/yaksh/send_emails.py
@@ -65,7 +65,7 @@ def send_bulk_mail(subject, email_body, recipients, attachments):
try:
text_msg = ""
msg = EmailMultiAlternatives(subject, text_msg, settings.SENDER_EMAIL,
- recipients
+ [settings.SENDER_EMAIL], bcc=recipients
)
msg.attach_alternative(email_body, "text/html")
if attachments:
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index fd4f040..514f1cd 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -2556,7 +2556,7 @@ class TestCourseDetail(TestCase):
attachment_file = mail.outbox[0].attachments[0][0]
subject = mail.outbox[0].subject
body = mail.outbox[0].alternatives[0][0]
- recipients = mail.outbox[0].recipients()
+ recipients = mail.outbox[0].bcc
self.assertEqual(attachment_file, "file.txt")
self.assertEqual(subject, "test_bulk_mail")
self.assertEqual(body, "Test_Mail")