#!/usr/bin/perl

# $Id$

# script for testing smscanner.  Submit messages to a host.

use strict;
use Mail::Sender;

my $fn=$ARGV[0];

print "sending $fn\n";

my $sender = new Mail::Sender({smtp => 'www.average.org',
				from => 'crosser@rol.ru',
				debug => '/dev/tty',
				auth => 'PLAIN',
				authid => 'testuser'.
				authpwd => 'testpass',
				});
unless (ref $sender) {
	print "new rc=$sender: ",$Mail::Sender::Error,"\n";
	exit(1);
}
$sender->MailFile({to => 'crosser@pccross.average.org',
		subject => 'Here is the file',
		msg => "sending",
		file => $fn});
unless (ref $sender) {
	print "send rc=$sender: ",$Mail::Sender::Error,"\n";
	exit(1);
}

