fix DBI connection, RT#39250
[freeside.git] / FS / bin / freeside-email
index c7ff411..6e4e0fe 100755 (executable)
@@ -12,11 +12,9 @@ my $user = shift or die &usage;
 adminsuidsetup $user;
 
 my $conf = new FS::Conf;
-my $domain = $conf->config('domain');
 
 my @svc_acct = qsearch('svc_acct', {});
-my @usernames = map $_->username, @svc_acct;
-my @emails = map "$_\@$domain", @usernames;
+my @emails = map $_->email, @svc_acct;
 
 print join("\n", @emails), "\n";
 
@@ -47,11 +45,7 @@ freeside-email - Prints email addresses of all users on STDOUT
 
 Prints the email addresses of all customers on STDOUT, separated by newlines.
 
-user: From the mapsecrets file - see config.html from the base documentation
-
-=head1 VERSION
-
-$Id: freeside-email,v 1.1 2001-05-15 07:52:34 ivan Exp $
+user: Freeside user
 
 =head1 BUGS