[Fixed]-How to make only specific user getting a newsletter-mail (Django)

1👍

As the error indicates, reader, is a queryset, but you seem to be treating it as an single instance of UserProfile. This should work to add all the recipients to the list:

to_list = [r.user.email for r in reader]

Do note however the following part of the documentation(emphasis mine):

recipient_list: A list of strings, each an email address. Each member of recipient_list will see the other recipients in the “To:” field of the email message.

If you don’t want all the recipients to see each other then you will need to send separate messages for each.

Leave a comment