Example #1
0
def bounty_startwork_expired(to_email, bounty, interest, time_delta_days):
    if not bounty or not bounty.value_in_usdt:
        return

    from_email = settings.CONTACT_EMAIL
    html, text = render_bounty_startwork_expire_warning(to_email, bounty, interest, time_delta_days)
    subject = "We've removed you from the task: '{}' ? ".format(bounty.title_or_desc)

    if not should_suppress_notification_email(to_email):
        send_mail(from_email, to_email, subject, text, html)
Example #2
0
def bounty_startwork_expire_warning(to_email, bounty, interest,
                                    time_delta_days):
    if not bounty or not bounty.value_in_usdt_now:
        return

    from_email = settings.CONTACT_EMAIL
    html, text = render_bounty_startwork_expire_warning(
        to_email, bounty, interest, time_delta_days)
    subject = gettext("Are you still working on '{}' ? ").format(
        bounty.title_or_desc)

    if not should_suppress_notification_email(to_email):
        send_mail(from_email, to_email, subject, text, html)
Example #3
0
def bounty_startwork_expired(to_email, bounty, interest, time_delta_days):
    if not bounty or not bounty.value_in_usdt_now:
        return
    cur_language = translation.get_language()
    try:
        setup_lang(to_email)
        from_email = settings.CONTACT_EMAIL
        html, text = render_bounty_startwork_expire_warning(to_email, bounty, interest, time_delta_days)
        subject = gettext("We've removed you from the task: '{}' ? ").format(bounty.title_or_desc)

        if not should_suppress_notification_email(to_email, 'bounty_expiration'):
            send_mail(from_email, to_email, subject, text, html, categories=['transactional', func_name()])
    finally:
        translation.activate(cur_language)
Example #4
0
def bounty_startwork_expire_warning(to_email, bounty, interest, time_delta_days):
    if not bounty or not bounty.value_in_usdt_now:
        return
    cur_language = translation.get_language()
    try:
        setup_lang(to_email)
        from_email = settings.CONTACT_EMAIL
        html, text = render_bounty_startwork_expire_warning(to_email, bounty, interest, time_delta_days)
        subject = gettext("Are you still working on '{}' ? ").format(bounty.title_or_desc)

        if not should_suppress_notification_email(to_email, 'transactional'):
            send_mail(from_email, to_email, subject, text, html)
    finally:
        translation.activate(cur_language)