diff --git a/Brie/brie/lib/aurore_helper.py b/Brie/brie/lib/aurore_helper.py index d8a3eab..34d2dd5 100644 --- a/Brie/brie/lib/aurore_helper.py +++ b/Brie/brie/lib/aurore_helper.py @@ -281,27 +281,8 @@ class CotisationComputes: from_mail = "noreply@fede-aurore.net" to_mail = [member.mail.first()] residence_name = Residences.get_name_by_dn(user_session,residence_dn).decode("utf-8").encode("ascii", "ignore") - - message = """From: Federation Aurore - To: """ + member.cn.first().decode("utf-8").encode("ascii", "ignore") + """ <""" + member.mail.first().decode("utf-8").encode("ascii", "ignore") + """> - Subject: Rappel: Votre cotisation """ + residence_name + """ - - Cher membre, - - Ceci est un message de la federation Aurore concernant votre cotisation a l'association """ + residence_name + """. - En effet celle-ci arrive a son terme dans moins de 7 jours, si vous souhaitez renouveller votre acces internet il est necessaire de recotiser a l'association a""" + residence_name + """ dans les délais les plus courts. - - Cordialement, - - Federation Aurore """ - message = message.encode("utf-8") - - try: - smtpObj = smtplib.SMTP('smtp.u-psud.fr') - smtpObj.sendmail(sender, receivers, message) - except SMTPException: - print "Error: unable to send email" #end def + @staticmethod # more than a month late def is_no_cotisation(member_dn, user_session, residence_dn, cotisations = None, anniversary = None, verification_old_member = True):