4 use FS::UID qw(adminsuidsetup);
6 use FS::Record qw(qsearch);
9 &untaint_argv; #what it sounds like (eww)
10 my $user = shift or die &usage;
14 my $conf = new FS::Conf;
15 my $domain = $conf->config('domain');
17 my @svc_acct = qsearch('svc_acct', {});
18 my @usernames = map $_->username, @svc_acct;
19 my @emails = map "$_\@$domain", @usernames;
21 print join("\n", @emails), "\n";
26 foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
27 #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
29 $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
35 die "Usage:\n\n freeside-email user\n";
40 freeside-email - Prints email addresses of all users on STDOUT
48 Prints the email addresses of all customers on STDOUT, separated by newlines.
50 user: From the mapsecrets file - see config.html from the base documentation
54 $Id: freeside-email,v 1.1 2001-05-15 07:52:34 ivan Exp $