Updated the jira script
[clearscm.git] / test / testmail.pl
index 8ac46bd..2fb5635 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env cqperl
+#!/usr/bin/env perl
 ################################################################################
 #
 # File:         $RCSfile: testmail.pl,v $
@@ -17,17 +17,10 @@ use warnings;
 
 use FindBin;
 
-my $libs;
-
-BEGIN {
-  $libs = $ENV{SITE_PERLLIB} ? $ENV{SITE_PERLLIB} : "$FindBin::Bin/../lib";
-
-  die "Unable to find libraries\n" if !$libs;
-}
-
-use lib $libs;
+use lib "$FindBin::Bin/../lib";
 
 use Mail;
+use Display;
 
 my $data = <<END;
 <table cellspacing=0 border=1>
@@ -75,14 +68,18 @@ END
 
 my $heading    = "<h1>Helpdesk Report as of 20070801</h1>";
 my $subject    = "Helpdesk Report";
-my $to         = "andrew.defaria\@gdc4s.com";
+my $to         = "Andrew\@DeFaria.com";
 
 # Main
+display "Calling mail";
 mail (
-  "to"         => $to,
-  "subject"    => $subject,
-  "mode"       => "html",
-  "heading"    => $heading,
-  "footing"    => $footing,
-  "data"       => $data,
-)
+  to            => $to,
+  port          => 1025,
+  subject       => $subject,
+  mode          => "html",
+  heading       => $heading,
+  footing       => $footing,
+  data          => $data,
+  randomizeFrom => 1,
+);
+display "Called mail";
\ No newline at end of file