def render_ptoken_created(ptoken): params = {'ptoken': ptoken} response_html = premailer_transform( render_to_string("emails/ptoken_created.html", params)) response_txt = render_to_string("emails/ptoken_created.txt", params) subject = _("🎉 Your new personal token is ready 🎉") return response_html, response_txt, subject
def render_ptoken_redemption_cancelled(ptoken, redeem): params = {'ptoken': ptoken, 'redeem': redeem} response_html = premailer_transform( render_to_string("emails/ptoken_redemption_cancelled.html", params)) response_txt = render_to_string("emails/ptoken_redemption_cancelled.txt", params) subject = _("Redemption cancelled") return response_html, response_txt, subject
def render_ptoken_redemption_complete_for_owner(ptoken, redeem): params = {'ptoken': ptoken, 'redeem': redeem} response_html = premailer_transform( render_to_string("emails/ptoken_redemption_complete_for_owner.html", params)) response_txt = render_to_string( "emails/ptoken_redemption_complete_for_owner.txt", params) subject = _(f"🌈 Redemption complete for {redeem.reason}") return response_html, response_txt, subject