/[docman]/contrib/sendlogins.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /contrib/sendlogins.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Thu Apr 12 10:27:56 2001 UTC revision 1.3 by dpavlin, Wed Jul 3 08:22:55 2002 UTC
# Line 2  Line 2 
2    
3  # usage: cat .htusers | sendlogins.pl http://docmain.domain.com/  # usage: cat .htusers | sendlogins.pl http://docmain.domain.com/
4    
5  my $debug=1;  #my $debug=1;
6    
7  my $in_mail=$0;  my $in_mail=$0;
8  $in_mail=~s/\.pl/.txt/;  $in_mail=~s/\.pl/.txt/;
9    
10  my $url=$ARGV[0];  my $url=$ARGV[0];
11    
12    if (! $url) {
13            print STDERR "To send announcement to all users in .htusers file use\n";
14            print STDERR "$0 http://docman.site.com/ < .htusers\n";
15            exit 1;
16    }
17    
18  $|++;  $|++;
19    
20  while(<STDIN>) {  while(<STDIN>) {
# Line 17  while(<STDIN>) { Line 23  while(<STDIN>) {
23    
24          ($login,$fullname,undef,$email) = split(/:/,$_);          ($login,$fullname,undef,$email) = split(/:/,$_);
25          my $host=$email;          my $host=$email;
26          $host=~s/^[^@]@*//g;          $host=~s/^[^@]*@//g;
27    
28          if (defined $debug) {          if (defined $debug) {
29                  open(MAIL,">> /tmp/mailfoo") || die "$!";                  open(MAIL,">> /tmp/mailfoo") || die "$!";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.26