X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FEdwardNG.pm;h=4da1968ce2ab082321fc2ea5b334252f2ee6767e;hb=8dd68edb17156d846480991d2db9844c2b3ba6e6;hp=e778d6a20b70f6c065ca5a6f47b1c89a44238976;hpb=2044b38a0328a71f923cbe1e55f0d95254f3fff4;p=app-edwardng.git diff --git a/lib/App/EdwardNG.pm b/lib/App/EdwardNG.pm index e778d6a..4da1968 100644 --- a/lib/App/EdwardNG.pm +++ b/lib/App/EdwardNG.pm @@ -8,6 +8,7 @@ our $VERSION = '0.001'; our @EXPORT = qw/process_message/; use Email::Sender::Simple qw/sendmail/; +use File::Share qw/dist_file/; use File::Slurp qw/read_file/; use File::Spec::Functions qw/rel2abs/; use Getopt::Long; @@ -33,7 +34,7 @@ sub mg { sub first_part{ my ($ent) = @_; return first_part $ent->parts(0) if $ent->parts; - $ent->bodyhandle->as_string + stringify [$ent->bodyhandle->as_lines] } sub process_message { @@ -117,7 +118,7 @@ sub run { $params{plaintext} = first_part $params{decrypted} if $params{decrypted}; - my $tt = Template->new(INCLUDE_PATH => rel2abs $tmpl_path, 'tmpl'); + my $tt = Template->new(INCLUDE_PATH => rel2abs $tmpl_path, dist_file 'App-EdwardNG', 'tmpl'); my $data; $tt->process($tmpl, \%params, \$data); my $email = MIME::Entity->build(