+ link = VOTE_URL % vote[0]
+ BODY = string.join((
+ "From: %s" % EMAIL,
+ "To: %s" % user[1],
+ "Subject: [Cavote] %s" % gettext(u"Vote reminder - You didn't take part to it"),
+ "Date: %s" % time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()).decode('utf-8'),
+ "Content-type: text/plain; charset=utf-8",
+ "X-Mailer: %s" % VERSION,
+ "",
+ "%s %s : %s" % (gettext(u"A vote concerns you and is going to terminate on"), vote[2], vote[3]),
+ gettext(u"You still didn't take part to it !"),
+ "",
+ gettext(u"This link will bring you to the form where you will be able to participate :"),
+ link,
+ "",
+ gettext(u"If you think this mail is not for you, please ignore and delete it.")
+ ), "\r\n")
+ server = smtplib.SMTP(SMTP_SERVER)
+ print EMAIL
+ print user[1]
+ print BODY.encode('utf-8')
+ server.sendmail(EMAIL, user[1], BODY.encode('utf-8'))
+ server.quit()
+ else:
+ link = VOTE_URL % vote[0]