--- contrib/sendlogins.pl 2001/04/12 10:27:56 1.1 +++ contrib/sendlogins.pl 2002/07/03 08:22:55 1.3 @@ -2,13 +2,19 @@ # usage: cat .htusers | sendlogins.pl http://docmain.domain.com/ -my $debug=1; +#my $debug=1; my $in_mail=$0; $in_mail=~s/\.pl/.txt/; my $url=$ARGV[0]; +if (! $url) { + print STDERR "To send announcement to all users in .htusers file use\n"; + print STDERR "$0 http://docman.site.com/ < .htusers\n"; + exit 1; +} + $|++; while() { @@ -17,7 +23,7 @@ ($login,$fullname,undef,$email) = split(/:/,$_); my $host=$email; - $host=~s/^[^@]@*//g; + $host=~s/^[^@]*@//g; if (defined $debug) { open(MAIL,">> /tmp/mailfoo") || die "$!";