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