# Replace getEmailNotifyList in lib/TWiki.pm with this version # this version handles also names of the form # * Main.UserName # and will fetch the email(s) from the User Topic # ========================= sub getEmailNotifyList { my( $web, $topicname ) = @_; $topicname = $TWiki::notifyTopicname unless $topicname; return() unless &TWiki::Store::topicExists( $web, $topicname ); my @list = (); foreach (split( /\n/, &TWiki::Store::readWebTopic($web, $topicname))) { if (/^\s\*\s[A-Za-z0-9\.]+\s+\-\s+/) { # full form: * name - email push @list, $1 if (/([\w\-\.\+]+\@[\w\-\.\+]+)/); } elsif (/^\s\*\s$TWiki::mainWebname[.]([A-Z][A-Za-z0-9]+)/) { # short form: * name my $userWikiName = $1; $debug && print "short form: $TWiki::mainWebname . $userWikiName\n"; if (&TWiki::Store::topicExists($TWiki::mainWebname, $userWikiName)) { $debug && print "reading homepage: $TWiki::mainWebname . $userWikiName\n"; foreach (split( /\n/, &TWiki::Store::readWebTopic($TWiki::mainWebname, $userWikiName))) { if (/^\s\*\sEmail:\s+([\w\-\.\+]+\@[\w\-\.\+]+)/) { # Email field push @list, $1; } } } } } $debug && print "list of emails: @list\n"; return( @list ); }