Exemplo n.º 1
0
def funder_stale(to_email,
                 github_username,
                 days=30,
                 time_as_str='about a month'):
    from_email = '*****@*****.**'
    cur_language = translation.get_language()
    try:
        setup_lang(to_email)

        subject = "hey from gitcoin.co" if not github_username else f"hey @{github_username}"
        __, text = render_funder_stale(github_username, days, time_as_str)
        cc_emails = [
            from_email, '*****@*****.**',
            '*****@*****.**'
        ]
        if not should_suppress_notification_email(to_email,
                                                  'admin_contact_funder'):
            send_mail(
                from_email,
                to_email,
                subject,
                text,
                cc_emails=cc_emails,
                from_name=from_email,
                categories=['transactional', func_name()],
            )
    finally:
        translation.activate(cur_language)
Exemplo n.º 2
0
def funder_stale(to_email,
                 github_username,
                 days=30,
                 time_as_str='about a month'):
    from_email = settings.PERSONAL_CONTACT_EMAIL
    cur_language = translation.get_language()
    try:
        setup_lang(to_email)

        subject = "hey from gitcoin.co" if not github_username else f"hey @{github_username}"
        html, text = render_funder_stale(github_username, days, time_as_str)
        cc_emails = [
            from_email, '*****@*****.**',
            '*****@*****.**', '*****@*****.**'
        ]
        if not should_suppress_notification_email(to_email,
                                                  'admin_contact_funder'):
            send_mail(from_email,
                      to_email,
                      subject,
                      text,
                      cc_emails=cc_emails,
                      from_name=from_email)
    finally:
        translation.activate(cur_language)
Exemplo n.º 3
0
Arquivo: mails.py Projeto: nemani/web
def funder_stale(to_email, github_username, days=30, time_as_str='about a month'):
    from_email = settings.PERSONAL_CONTACT_EMAIL
    cur_language = translation.get_language()
    try:
        setup_lang(to_email)

        subject = "hey from gitcoin.co"
        html, text = render_funder_stale(github_username, days, time_as_str)
        cc_emails = [from_email, '*****@*****.**']
        if not should_suppress_notification_email(to_email, 'admin_contact_funder'):
            send_mail(from_email, to_email, subject, text, cc_emails=cc_emails, from_name=from_email)
    finally:
        translation.activate(cur_language)