Beispiel #1
0
def new_bounty_rejection(bounty, to_emails=None):
    if not bounty or not bounty.value_in_usdt_now:
        return

    subject = gettext("😕 Work Submission Rejected for {} 😕").format(
        bounty.title_or_desc)

    if to_emails is None:
        to_emails = []

    for to_email in to_emails:
        cur_language = translation.get_language()
        try:
            setup_lang(to_email)
            from_email = settings.CONTACT_EMAIL
            html, text = render_new_bounty_rejection(to_email, bounty)

            if not should_suppress_notification_email(to_email, 'bounty'):
                send_mail(from_email,
                          to_email,
                          subject,
                          text,
                          html,
                          categories=['transactional',
                                      func_name()])
        finally:
            translation.activate(cur_language)
Beispiel #2
0
def new_bounty_rejection(bounty, to_emails=None):
    if not bounty or not bounty.value_in_usdt:
        return

    if to_emails is None:
        to_emails = []

    subject = "😕 Fulfillment Rejected for {} 😕".format(bounty.title_or_desc)

    for to_email in to_emails:
        from_email = settings.CONTACT_EMAIL
        html, text = render_new_bounty_rejection(to_email, bounty)

        if not should_suppress_notification_email(to_email):
            send_mail(from_email, to_email, subject, text, html)
Beispiel #3
0
def new_bounty_rejection(bounty, to_emails=None):
    if not bounty or not bounty.value_in_usdt_now:
        return

    subject = gettext("😕 Work Submission Rejected for {} 😕").format(
        bounty.title_or_desc)

    if to_emails is None:
        to_emails = []

    for to_email in to_emails:
        from_email = settings.CONTACT_EMAIL
        html, text = render_new_bounty_rejection(to_email, bounty)

        if not should_suppress_notification_email(to_email):
            send_mail(from_email, to_email, subject, text, html)