Example #1
0
def notify_unclaimed_gold(txn_id, gold_secret, payer_email, source):
    from r2.lib import emailer
    url = "http://www.reddit.com/thanks/" + gold_secret

    # No point in i18n, since we don't have access to the user's
    # language info (or name) at this point
    if gold_secret.startswith("cr_"):
        body = """
Thanks for buying reddit gold gift creddits! We have received your %s
transaction, number %s.

Your secret claim code is %s. To associate the
creddits with your reddit account, just visit
%s
""" % (source, txn_id, gold_secret, url)
    else:
        body = """
Thanks for subscribing to reddit gold! We have received your %s
transaction, number %s.

Your secret subscription code is %s. You can use it to associate this
subscription with your reddit account -- just visit
%s
""" % (source, txn_id, gold_secret, url)

    emailer.gold_email(body, payer_email, "reddit gold subscriptions")
Example #2
0
def notify_unclaimed_gold(txn_id, gold_secret, payer_email, source):
    from r2.lib import emailer
    url = "http://www.reddit.com/thanks/" + gold_secret

    # No point in i18n, since we don't have access to the user's
    # language info (or name) at this point
    if gold_secret.startswith("cr_"):
        body = """
Thanks for buying reddit gold gift creddits! We have received your %s
transaction, number %s.

Your secret claim code is %s. To associate the
creddits with your reddit account, just visit
%s
""" % (source, txn_id, gold_secret, url)
    else:
        body = """
Thanks for subscribing to reddit gold! We have received your %s
transaction, number %s.

Your secret subscription code is %s. You can use it to associate this
subscription with your reddit account -- just visit
%s
""" % (source, txn_id, gold_secret, url)

    emailer.gold_email(body, payer_email, "reddit gold subscriptions")