summaryrefslogtreecommitdiff
path: root/regress/message/send.pl
blob: 155b415be679f836e55f1eae438a90dd79f53891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/local/bin/perl
#-*- perl -*-
#
#  Copyright (C) 2001 Ken'ichi Fukamachi
#   All rights reserved. This program is free software; you can
#   redistribute it and/or modify it under the same terms as Perl itself. 
#
# $FML: basic_io.pl,v 1.4 2001/04/13 04:34:07 fukachan Exp $
#

use strict;
use Carp;
use lib qw(../../cpan/lib ../../fml/lib);
use Mail::Message;
use FileHandle;

my $sender = 'elena-admin@sapporo.iij.ad.jp';
my $rcpt   = 'fukachan@sapporo.iij.ad.jp';
my $array  = [ $rcpt ];

for my $file (@ARGV) {
    my $fh  = new FileHandle $file;
    my $msg = Mail::Message->parse( { fd => $fh } );

    use FML::Mailer;
    my $obj = new FML::Mailer;
    $obj->send( {
	sender    => $sender,
	recipient => $rcpt,
	message   => $msg,
    });
}

exit 0;