print userchoice
if userchoice is None:
#user didn't vote yet
- link = "http://vote.ffdn.org/vote/%d" % vote[0]
+ link = VOTE_URL % vote[0]
BODY = string.join((
"From: %s" % EMAIL,
"To: %s" % user[1],
server = smtplib.SMTP(SMTP_SERVER)
print EMAIL
print user[1]
- print BODY
+ print BODY.encode('utf-8')
server.sendmail(EMAIL, user[1], BODY.encode('utf-8'))
server.quit()
else:
- link = "http://vote.ffdn.org/vote/%d" % vote[0]
+ link = VOTE_URL % vote[0]
BODY = string.join((
"From: %s" % EMAIL,
"To: %s" % user[1],
server = smtplib.SMTP(SMTP_SERVER)
print EMAIL
print user[1]
- print BODY
+ print BODY.encode('utf-8')
server.sendmail(EMAIL, user[1], BODY.encode('utf-8'))
server.quit()