Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bin/mail
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,18 @@ EDLOOP: {
1;
package main;

use English;
use File::Basename qw(basename);
use File::Temp;
use Getopt::Std;

use vars qw($opt_f $opt_s $opt_c $opt_b $opt_v);

our $VERSION = '0.04';
our $ROWS = 23; # Screen Dimensions. Yeah, this sucks.
our $COLS = 80;
our $BUFFERL = 2; # Lines needed for "fluff"

my $Program = basename($0);
my $box;

my %commands=(
Expand Down Expand Up @@ -975,7 +978,6 @@ sub Interactive {
my $current=1;

select STDOUT; $|=1;
print "Mail [$VERSION Perl] [$OSNAME]\n"; # This is fluff.
my $cmd = "Init";

CMDS: {
Expand Down Expand Up @@ -1037,9 +1039,14 @@ sub Batch {
$mailer->send($message);
}

sub VERSION_MESSAGE {
print "$Program version $VERSION\n";
exit;
}

getopts("f:s:c:b:v") || die <<USAGE;
$0 [-f mailbox]
$0 [-s subject] [-c cc-addrs] [-b bcc-addrs] to-addr [..toaddr..]
usage: $Program [-s subject] [-c cc-addrs] [-b bcc-addrs] to-addr [..toaddr..]
or: $Program [-f mailbox]
USAGE

if (@ARGV) { # Assume batch-mode
Expand Down
Loading