--- trunk/sender.pl 2005/05/17 11:09:08 33 +++ trunk/sender.pl 2005/05/18 13:12:54 45 @@ -40,7 +40,6 @@ "inbox=s" => \$opt->{'inbox'}, "debug" => \$debug, "verbose" => \$verbose, - "email=s" => \$opt->{'email'}, ); my $nos = new Nos( @@ -112,9 +111,8 @@ foreach my $list (@lists) { print $list->name," <",$list->email,">\n"; - foreach my $user_on_list ($user_list->search(list_id => $list->id)) { - my $user = $users->retrieve( id => $user_on_list->user_id ); - print "\t",$user->full_name," <", $user->email, ">\n"; + foreach my $u ($nos->list_members( list => $list->name )) { + print "\t",$u->{'name'}, " <", $u->{'email'}, ">\n"; } } @@ -127,9 +125,6 @@ email@example.com Optional full name of person dpavlin@rot13.org Dobrica Pavlinusic -You may use C<--email> parametar at any time to set From: e-mail address for list. -B. - =cut } elsif ($list_name = $opt->{'add'}) { @@ -190,7 +185,7 @@ my $msg = $m->message_id->message; $msg =~ s/\s+/ /gs; - $l .= sprintf(" %-10s %15s : ", $m->list_id->name, $date); + $l .= sprintf(" %-15s %15s : ", $m->list_id->name, $date); $l .= substr($msg, 0, 79 - length($l)); print "$l\n"; @@ -217,9 +212,18 @@ =cut -} elsif ($opt->{'inbox'}) { +} elsif ($list_name = $opt->{'inbox'}) { + + my $message; + while(<>) { + $message .= $_; + } + + $nos->inbox_message( + list => $list_name, + message => $message, + ) || die "can't receive message for list $list_name"; - warn "inbox option is not implemented"; } else { die "see perldoc $0 for help\n"; @@ -241,10 +245,6 @@ Dump more info on screen. -=item --email - -Used to specify e-mail address where needed. - =back