models.py

class FollowerEmail(models.Model):
    report = models.ForeignKey(Report)
    email = models.CharField('Email', max_length=100)

views.py

def what(request):
  
    """"""
    follower = FollowerEmail.objects.filter(report=report)
    list=[]        
    for email in follower:
        list.append(email.email)
    """"""""
     if 'send_email' in request.POST:
            subject, from_email, to = 'Notification',user.email, 
person.parent_email
            html_content = 
render_to_string('incident/print.html',{'person':person,
                                                                 
'report':report,
                                                                 'list':list,
                                                                  }) 
            text_content = strip_tags(html_content) 
            msg = EmailMultiAlternatives(subject, text_content, from_email, 
[to],bcc=[list], cc=['roopasingh...@gmail.com'])
            msg.attach_alternative(html_content, "text/html")
            msg.send()

The above is my view.py to send email,email is sending to "to" address 
properlly.Problem is with bcc tag.I am taking the email from FollowerEmail 
table and making a list.I am passing that list to bcc,as bcc email id list 
would be large,will be more than 3.

If list is having more than 2 email id,application is not sending  mail,if it 
is two or one,application is sending mail.What could be the problem

Thanks
  


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to