Removed /usr/local from CDPATH
[clearscm.git] / maps / test.pl
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use lib "/opt/clearscm/lib";
6
7 use Display;
8 use Utils;
9 use Net::SMTP;
10
11 my %config = (
12   SMTPHOST => 'defaria.com',
13 );
14
15 sub DeliverMsg ($) {
16   my ($msg) = @_;
17   
18   my $smtp = Net::SMTP->new ($config{SMTPHOST})
19     or error "Unable to connect to mail server: $config{SMTPHOST}", 1;
20   
21   $smtp->mail ('Andrew@DeFaria.com');
22   
23   $smtp->to ('adefaria@gmail.com');
24   
25   $smtp->data;
26   $smtp->datasend ('From: Andrew@DeFaria.com');
27   $smtp->datasend ('To: adefaria@gmail.com');
28   $smtp->datasend ('Subject: Forwarded mail');
29   $smtp->datasend ('Content-Type: plain/text');
30   $smtp->datasend ("\n");
31   $smtp->datasend ($msg);
32   $smtp->dataend;
33   $smtp->quit;
34   
35   return;    
36 } # DeliverMsg
37
38 my $msg = ReadFile 'test.msg';
39
40 DeliverMsg ($msg);
41
42 display 'done';