(self, context, from_email, recipient_list)
Send mass individual mail to list of recipients
Send mass individual mail to list of recipients
Send mass individual mail to list of recipients
def send_mass(self, context, from_email, recipient_list):
        """
        Send mass individual mail to list of recipients
        """
        subject, text, html = self.render(context)

        # Text may be indented in template.
        text = textwrap.dedent(text)

        # Send mass html email
        if len(html) < 10:
            # Format mass mail
            datatuple = ((subject, text, from_email, [rec]) for rec in recipient_list)
            send_mass_mail(datatuple=datatuple, fail_silently=False)
        else:
            send_mass_html_mail(subject=subject,
                                message=text,
                                message_html=html,
                                from_email=from_email,
                                recipient_list=recipient_list)
def send_mass ( self , context , from_email , recipient_list ) : subject , text , html = self . render ( context ) # Text may be indented in template. text = textwrap . dedent ( text ) # Send mass html email if len ( html ) < 10 : # Format mass mail datatuple = ( ( subject , text , from_email , [ rec ] ) for rec in recipient_list ) send_mass_mail ( datatuple = datatuple , fail_silently = False ) else : send_mass_html_mail ( subject = subject , message = text , message_html = html , from_email = from_email , recipient_list = recipient_list )