def new_match(to_emails, bounty, github_username): subject = "⚡️ {} Meet {}: {}! ".format(github_username.title(), bounty.org_name.title(), bounty.title) to_email = to_emails[0] from_email = settings.CONTACT_EMAIL html, text = render_match_email(bounty, github_username) send_mail(from_email, to_email, subject, text, html, cc_emails=to_emails)
def new_match(to_emails, bounty, github_username): subject = gettext("⚡️ {} Meet {}: {}! ").format(github_username.title(), bounty.org_name.title(), bounty.title) to_email = to_emails[0] cur_language = translation.get_language() try: setup_lang(to_email) from_email = settings.CONTACT_EMAIL html, text = render_match_email(bounty, github_username) if not should_suppress_notification_email(to_email, 'bounty_match'): send_mail(from_email, to_email, subject, text, html, cc_emails=to_emails) finally: translation.activate(cur_language)