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