Index: openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/rollout-email-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl 29 Jun 2004 10:17:44 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/rollout-email-procs.tcl 13 Jan 2005 13:55:55 -0000 1.5 @@ -106,13 +106,20 @@ @author Andrew Grumet @date 29 July 2002 - } { set allowed [ns_config ns/server/[ns_info server]/acs/acs-rollout-support EmailAllow] - if { [lsearch [split $allowed ,] $to] >= 0 } { - return [_old_ns_sendmail $to $from $subject $body $extraheaders $bcc] + + # make sure we are comparing just the email address portion + # not a@b.com and a@b.com (Abc Def) + # note this takes out the name part as a side effect. -jfr + regexp {([a-zA-Z0-9][^ @]*)@([a-zA-Z0-9_.-]+\.[a-zA-Z]{2,6})} $to match beginning end + set to_for_comparison "${beginning}@${end}" + + if { [lsearch [split $allowed ,] $to_for_comparison] >= 0 } { + + return [_old_ns_sendmail $to_for_comparison $from $subject $body $extraheaders $bcc] } else { - return [ro::email::sendmail_log $to $from $subject $body $extraheaders $bcc] + return [ro::email::sendmail_log $to_for_comparison $from $subject $body $extraheaders $bcc] } }