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))
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))
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))