recipient_list isn’t getting the email address in django

Recipient list has to be a list object not a Queryset or any other array like object i believe. So add the following modification to your get_mail variable:

    mail_qs = User.objects.filter(is_admin=True).values_list('email', flat=True)
    get_mail = list(mail_qs)

Should work if the queryset isn’t empty.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top