[admin/controle_chartes_MA.py] on envoie bien les mails à tout le monde
darcs-hash:20091109025451-bd074-5a33a9e892966337c0ac328c3c49209da3ecd56a.gz
This commit is contained in:
parent
f0da55bf97
commit
35c4bff00e
1 changed files with 4 additions and 2 deletions
|
@ -140,14 +140,16 @@ def spammer():
|
||||||
# On envoi un mail à chacun de ces membres actifs
|
# On envoi un mail à chacun de ces membres actifs
|
||||||
from smtplib import SMTP
|
from smtplib import SMTP
|
||||||
connexion = SMTP()
|
connexion = SMTP()
|
||||||
connexion.connect("rouge.crans.org")
|
if gethostname().split(".")[0] == 'rouge':
|
||||||
|
connexion.connect("localhost")
|
||||||
|
else: connexion.connect("rouge.crans.org")
|
||||||
print "Envoi des mails de rappel pour les chartes des membres actifs"
|
print "Envoi des mails de rappel pour les chartes des membres actifs"
|
||||||
|
|
||||||
for adh in todo_list:
|
for adh in todo_list:
|
||||||
to = adh.email()
|
to = adh.email()
|
||||||
print to
|
print to
|
||||||
if not debug:
|
if not debug:
|
||||||
data = config.txt_charte_MA.encode('utf-8') % {'From' : u"ca@crans.org", 'To' : to}
|
data = config.txt_charte_MA % {'From' : u"ca@crans.org", 'To' : to}
|
||||||
connexion.sendmail("ca@crans.org",to,data.encode('iso-8859-15'))
|
connexion.sendmail("ca@crans.org",to,data.encode('iso-8859-15'))
|
||||||
|
|
||||||
def __usage(message=None):
|
def __usage(message=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue