From: Chris Nehren Date: Sun, 4 Sep 2011 02:42:30 +0000 (-0400) Subject: handy dandy message generator X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44fd08906a3c20efbe09d95747751f88b25fb810;p=p5sagit%2FPromulger.git handy dandy message generator --- diff --git a/script/make_message b/script/make_message new file mode 100644 index 0000000..aa4d20d --- /dev/null +++ b/script/make_message @@ -0,0 +1,20 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use Email::MIME; +use File::Slurp 'read_file'; + +my ($from, $to, $subject) = @ARGV; +my $body = read_file \*STDIN; + + +my $email = Email::MIME->create( + header => [ + From => $from, + To => $to, + Subject => $subject, + ], + body => $body, +); +print $email->as_string;