I’m going to make a list of recipients in for loop then use send_mail :
for participant in participants:
list.append(participant.mail)
then:
send_mail(email_subject,email_body,'sender@gmail.com',list,fail_silently=False)
what’s the right way to make this list?
Well, what you have will work, assuming you define a list to use, first:
But, a list comprehension is easier: