[Tutor] Script performance: Filtering email
Sheila King
sheila@thinkspot.net
Tue, 16 Jan 2001 23:24:04 -0800
Found my bug. The original code is show below. The correction follows.
On Tue, 16 Jan 2001 01:18:19 -0800, Sheila King <sheila@thinkspot.net> wrote
about [Tutor] Script performance: Filtering email:
: ##check if to: and cc: addresses are in my approved file
: def goodmessage(addresseeslist, rcptlist):
: for addr in addresseeslist:
: for rcpt in rcptlist:
: if (upper(addr[1]) == upper(rcpt)):
: return 1
: return 0
Correction:
def goodmessage(addresseeslist, rcptlist):
for addr in addresseeslist:
for rcpt in rcptlist:
if (string.upper(addr[1]) == string.upper(rcpt)):
return 1
return 0
Note this line, especially:
if (string.upper(addr[1]) == string.upper(rcpt)):
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/