Mieux
darcs-hash:20071031191345-c992d-6b77f6dfefb7e5a5292ff82c9960272fdbe0bafa.gz
This commit is contained in:
parent
596c26af06
commit
97ab8fb0e4
1 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
|
||||
# Copyright (C) Stéphane Glondu, Alexandre Bos
|
||||
# Copyright (C) Stéphane Glondu, Alexandre os
|
||||
# Licence : GPLv2
|
||||
|
||||
u"""Ce script permet au secrétaire de repérer plus facilement les membres
|
||||
|
@ -142,20 +142,21 @@ def spammer():
|
|||
if (adh.droits() != ['MultiMachines']) and (adh.charteMA() == False):
|
||||
todo_list.append(adh)
|
||||
|
||||
print len(todo_list)
|
||||
#print len(todo_list)
|
||||
|
||||
# On envoi un mail à chacun de ces membres actifs
|
||||
from smtplib import SMTP
|
||||
connexion = SMTP()
|
||||
connexion.connect()
|
||||
connexion.connect("rouge.crans.org")
|
||||
print "Envoi des mails de rappel pour les chartes des membres actifs"
|
||||
|
||||
for adh in todo_list:
|
||||
to = adh.email()
|
||||
print to
|
||||
if not debug:
|
||||
connexion.sendmail("bureau@crans.org",to,config.txt_charte_MA % {'From' : "bureau@crans.org", 'To' : to})
|
||||
else:
|
||||
print to
|
||||
data = config.txt_charte_MA % {'From' : u"bureau@crans.org", 'To' : to}
|
||||
connexion.sendmail("bureau@crans.org",to,data.encode('iso-8859-15'))
|
||||
|
||||
def __usage(message=None):
|
||||
""" Comment ça marche ? """
|
||||
cprint(__doc__ % { 'prog': sys.argv[0] })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue