1 |
#!/usr/bin/perl |
2 |
|
3 |
use strict; |
4 |
use warnings; |
5 |
|
6 |
|
7 |
use MIME::Lite; |
8 |
|
9 |
use lib qw( /data/libs/nfo/perl/libs ); |
10 |
use shortcuts qw( now ); |
11 |
|
12 |
my $now = now(); |
13 |
|
14 |
#my $to = 'joko@netfrag.org'; |
15 |
my $to = 'test@netfrag.org'; |
16 |
|
17 |
my $subject = |
18 |
"This is just a test mail. Please ignore it." . "\n" . |
19 |
"-- generated $now" . "\n"; |
20 |
my $data = "$subject"; |
21 |
|
22 |
my $msg = MIME::Lite->new( |
23 |
# From => 'test@localhost', |
24 |
# From => 'test', |
25 |
From => 'test@netfrag.org', |
26 |
To => "$to", |
27 |
Subject => "$subject", |
28 |
Data => "$data\n", |
29 |
); |
30 |
my $str = $msg->as_string; |
31 |
|
32 |
print $str; |
33 |
|
34 |
1; |
35 |
|