--- trunk/sender.pl 2005/05/17 17:49:14 36 +++ trunk/sender.pl 2005/05/24 14:02:05 47 @@ -40,7 +40,8 @@ "inbox=s" => \$opt->{'inbox'}, "debug" => \$debug, "verbose" => \$verbose, - "email=s" => \$opt->{'email'}, + "from=s" => \$opt->{'from'}, + "driver=s" => \$opt->{'email_send_driver'}, ); my $nos = new Nos( @@ -74,6 +75,9 @@ Adds new list. You can also feed list name as first line to C. +You can also add C<--from='Full name of list'> to specify full name (comment) +in outgoing e-mail. + =cut if ($list_name = $opt->{'new'}) { @@ -85,6 +89,7 @@ my $id = $nos->new_list( list => $list_name, + from => ($opt->{'from'} || ''), email => $email, ) || die "can't add list $list_name\n"; @@ -112,9 +117,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 +131,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'}) { @@ -204,11 +205,14 @@ Send e-mails waiting in queue, or with optional argument, just send messages for single list. +Optional argument C<--driver=smtp> forces sending using SMTP server at +localhost (127.0.0.1). + =cut } elsif (defined($list_name = $opt->{'send'})) { - $nos->send_queued_messages($list_name); + $nos->send_queued_messages($list_name, $opt->{'email_send_driver'}); =item --inbox=list_name @@ -250,10 +254,6 @@ Dump more info on screen. -=item --email - -Used to specify e-mail address where needed. - =back