Send to both uwdir email and csclub email

* We were getting lots of bounces from uwdir emails (perhaps grads?)
* In the worse case, someone will get the email twice
pull/5/head
David Bartley 15 years ago
parent 6027249715
commit 1cb28e9cc8
  1. 15
      ceo/console/main.py

@ -83,14 +83,15 @@ def expiredaccounts(args):
for member in mlist.values():
uid = member['uid'][0]
name = member['cn'][0]
email = uid
user = uwl.search_s(uwldap.base(), ldap.SCOPE_SUBTREE,
'(uid=%s)' % ldapi.escape(uid))
if len(user) > 0 and 'mailLocalAddress' in user[0][1]:
email = user[0][1]['mailLocalAddress'][0]
email = None
if send_email:
members.send_account_expired_email(name, email)
print '%s %s %s' % (uid.ljust(12), name.ljust(30), email)
members.send_account_expired_email(name, uid)
user = uwl.search_s(uwldap.base(), ldap.SCOPE_SUBTREE,
'(uid=%s)' % ldapi.escape(uid))
if len(user) > 0 and 'mailLocalAddress' in user[0][1]:
email = user[0][1]['mailLocalAddress'][0]
members.send_account_expired_email(name, email)
print '%s %s' % (uid.ljust(12), name.ljust(30))
# list of commands
commands = {

Loading…
Cancel
Save