Example #1
0
def weekly_roundup(to_emails=None):
    if to_emails is None:
        to_emails = []

    for to_email in to_emails:
        cur_language = translation.get_language()
        try:
            setup_lang(to_email)
            html, text, subject = render_new_bounty_roundup(to_email)
            from_email = settings.PERSONAL_CONTACT_EMAIL

            if not should_suppress_notification_email(to_email, 'roundup'):
                send_mail(
                    from_email,
                    to_email,
                    subject,
                    text,
                    html,
                    from_name="Kevin Owocki (Gitcoin.co)",
                    categories=['marketing', func_name()],
                )
            else:
                print('supressed')
        finally:
            translation.activate(cur_language)
Example #2
0
def weekly_roundup(to_emails=None):
    if to_emails is None:
        to_emails = []

    for to_email in to_emails:
        html, text, subject = render_new_bounty_roundup(to_email)
        from_email = settings.PERSONAL_CONTACT_EMAIL

        if not should_suppress_notification_email(to_email):
            send_mail(from_email, to_email, subject, text, html, from_name="Kevin Owocki (Gitcoin.co)")