<filename>authors/apps/notifications/utils.py<gh_stars>1-10
from django.core.mail import send_mail


def send_emails_to_recipients(notification, subscribed_users):
    to_list = []
    for user in subscribed_users:
        to_list.append(user.user.email)

    subject = notification.title
    body = notification.body
    send_mail(subject, body, '<EMAIL>',
              to_list, fail_silently=False)

<filename>authors/apps/notifications/utils.py<gh_stars>1-10
from django.core.mail import send_mail


def send_emails_to_recipients(notification, subscribed_users):
    to_list = []
    for user in subscribed_users:
        to_list.append(user.user.email)

    subject = notification.title
    body = notification.body
    send_mail(subject, body, '<EMAIL>',
              to_list, fail_silently=False)
