@app.task(bind=True)
def send_mail(self, subject, content, to_list=None, bcc_list=None, html=True):

    msg = EmailMessage(subject, content, settings.DEFAULT_FROM_EMAIL, to_list, bcc_list)

    if html:
        msg.content_subtype = 'html'

    try:
        ret = msg.send()
        if ret:
            logger.info("Successfully sent email message (to {0!r}) (bcc: {1!r}).".format(to_list, bcc_list))
        else:
            logger.error("task: send_mail returned {0!r} with args: {1!r}".fromat(ret, args))
        return ret
    except Exception as e:
        logger.error("Failed to send email message (to {0!r}) (bcc: {1!r}), traceback: {2!s}".format(to_list, bcc_list, e))
        raise self.retry(exc=e)
Send email to list set on ``to_list`` param.
dataset/ETHPy150Open scieloorg/scielo-manager/scielomanager/scielomanager/tasks.py/send_mail