head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2001.05.09.11.06.29; author ahuxley; state Exp; branches; next ; desc @MY MAIL USER AGENT @ 1.1 log @Initial revision @ text @#!MARKER_PERL_CMD #shpp include ../bldcfg/paths.shpp require 5; use strict; ($main::progname = $0) =~ s/^.*\/([^\/]+)/$1/; $main::rcs_id = '$Header: /diskb/home/alexis/dev/active/small/bin/RCS/reset-xringd-after-ppp.shpp,v 1.1 2001/02/04 15:23:41 alexis Exp alexis $'; $main::version_scheme = 'rcs'; ############################################################################## # # CONFIGURABLE STUFF STARTS HERE # ############################################################################## ############################################################################## # # CONFIGURABLE STUFF ENDS HERE # ############################################################################## sub main { my(@@ARGV) = @@_; my($letter_file); my(%headers, $header_line_no); while (defined($ARGV[0]) && $ARGV[0] =~ /^-/) { $_ = shift @@ARGV; if (/^-d(.*)/) { $main::verboselevel = ($1 ? $1 : shift @@ARGV); } elsif (/^-v$/) { $main::verboselevel = 3; } elsif (/^-V$/) { print "$main::progname version ", $main::version, "\n"; exit 0; } else { &usage; } } ########################################################################## # # SANITY CHECKS # ########################################################################## (defined(@@ARGV)) || &usage; ########################################################################## # # GUTS START HERE # ########################################################################## # # Send letter # # This is needed in order to make the reference work, or rather to # keep the argument numbers indexes of the passed arguments the same # on the sending and receiving side. %headers = (); # A 'To' line is not required, - therefore mail.pl.shpp doesn't do it. # But as a MUA it's nice to put one. &mail_header_add(\%headers, 'To: ' . join(', ', @@ARGV)); &send_mail(\%headers, \@@ARGV, \*STDIN); # # If we get this far everything is ok # return(0); } sub usage { print STDERR "Usage: $main::progname [ -v | -d ] ...\n"; print STDERR " $main::progname -V\n"; exit 1; } #shpp include ../lib/utils.pl.shpp #shpp include ../lib/mail.pl.shpp #shpp include ../lib/gep.pl.shpp @