Ejemplo n.º 1
0
    def _execute(cls, data, config):
        recipients = config.get('recipients')

        if not recipients:
            logger.warning("No emails given, skipping send.")
            return

        subject_template = data['subject_template']
        body_template = data['body_template']
        context = data['context']

        send_mass_template_mail(subject_template, body_template, recipients, context=context)
Ejemplo n.º 2
0
    def _execute(cls, data, config):
        if not all([settings.EMAIL_HOST_USER, settings.EMAIL_HOST_PASSWORD]):
            logger.debug("Email was not setup, skipping send.")
            return

        recipients = config.get('recipients')

        if not recipients:
            logger.warning("No emails given, skipping send.")
            return

        subject_template = data['subject_template']
        body_template = data['body_template']
        context = data['context']

        send_mass_template_mail(subject_template, body_template, recipients, context=context)