Parent Directory | Revision Log
+ enhanced - now using 'now' to include a timestamp to subject
1 | collector | 1.1 | #!/usr/bin/perl |
2 | |||
3 | use strict; | ||
4 | use warnings; | ||
5 | |||
6 | root | 1.2 | |
7 | collector | 1.1 | use MIME::Lite; |
8 | |||
9 | root | 1.2 | use lib qw( /data/libs/nfo/perl/libs ); |
10 | use org::netfrag::shortcuts qw( now ); | ||
11 | |||
12 | collector | 1.1 | my $to = 'joko@netfrag.org'; |
13 | root | 1.2 | my $subject = "Testmail - generated on " . now(); |
14 | collector | 1.1 | my $data = "$subject"; |
15 | |||
16 | my $msg = MIME::Lite->new( | ||
17 | root | 1.2 | # From => 'test@localhost', |
18 | From => 'test', | ||
19 | collector | 1.1 | To => "$to", |
20 | Subject => "$subject", | ||
21 | Data => "$data\n", | ||
22 | ); | ||
23 | my $str = $msg->as_string; | ||
24 | |||
25 | print $str; | ||
26 | root | 1.2 | |
27 | 1; | ||
28 |
MailToCvsAdmin">MailToCvsAdmin | ViewVC Help |
Powered by ViewVC 1.1.26 |