Esempio n. 1
0
def sendmail_to_signatory(user, pid):
    p = db.select('petition', where='id=$pid', vars=locals())[0]
    p.url = 'http//watchdog.net/c/%s' % (pid) 
    token = auth.get_secret_token(user.email)
    msg = render_plain.signatory_mailer(user, p, token)
    #@@@ shouldn't this web.utf8 stuff taken care by in web.py?
    web.sendmail(web.utf8(config.from_address), web.utf8(user.email), web.utf8(msg.subject.strip()), web.utf8(msg))
Esempio n. 2
0
def sendmail_to_signatory(user, pid):
    """sends a thanks mail to the user, with request to share the petition with friends.
    """
    p = get_petition_by_id(pid)
    p.url = "http://watchdog.net/c/%s" % (pid)
    token = auth.get_secret_token(user.email)
    msg = render_plain.signatory_mailer(user, p, token)
    web.sendmail(config.from_address, user.email, msg.subject.strip(), str(msg))
Esempio n. 3
0
def sendmail_to_signatory(user, pid):
    """sends a thanks mail to the user, with request to share the petition with friends.
    """
    p = get_petition_by_id(pid)
    p.url = 'http://watchdog.net/c/%s' % (pid)
    token = auth.get_secret_token(user.email)
    msg = render_plain.signatory_mailer(user, p, token)
    web.sendmail(config.from_address, user.email, msg.subject.strip(),
                 str(msg))
Esempio n. 4
0
def sendmail_to_signatory(user, pid):
    p = get_petition_by_id(pid)
    p.url = 'http://watchdog.net/c/%s' % (pid)
    token = auth.get_secret_token(user.email)
    msg = render_plain.signatory_mailer(user, p, token)
    web.sendmail(web.utf8(config.from_address), web.utf8(user.email), web.utf8(msg.subject.strip()), web.utf8(msg))