Private key passphrase.
+=item B<--tmpl-path>=I<path>
+
+Path to the template directory. Users of the default templates can select the language with this argument. Available languages: en. Defaults to B<--tmpl-path=en>.
+
=item B<--use-agent>, B<--no-use-agent>
If B<--use-agent>, use L<gpg-agent(1)>. Defaults to B<--no-gpg-agent>.
Corresponds to B<--passphrase>.
+=item EDWARDNG_TMPL_PATH
+
+Corresponds to B<--tmpl-path>.
+
=item EDWARDNG_USE_AGENT
Corresponds to B<--use-agent> (if true) and B<--no-use-agent> (if false).
use Email::Sender::Simple qw/sendmail/;
use File::Slurp qw/read_file/;
+use File::Spec::Functions qw/rel2abs/;
use Getopt::Long;
use MIME::Entity;
use MIME::Parser;
'key=s' => \$ENV{EDWARDNG_KEY},
'keydir=s' => \$ENV{EDWARDNG_KEYDIR},
'passphrase=s' => \$ENV{EDWARDNG_PASSPHRASE},
+ 'tmpl-path=s' => \$ENV{EDWARDNG_TMPL_PATH},
'use-agent!' => \$ENV{EDWARDNG_USE_AGENT},
);
+ my $tmpl_path = $ENV{EDWARDNG_TMPL_PATH} // 'en';
my $parser = MIME::Parser->new;
$parser->decode_bodies(0);
$params{plaintext} = first_part $params{decrypted} if $params{decrypted};
- my $tt = Template->new(INCLUDE_PATH => 'tmpl/en');
+ my $tt = Template->new(INCLUDE_PATH => rel2abs $tmpl_path, 'tmpl');
my $data;
$tt->process($tmpl, \%params, \$data);
my $email = MIME::Entity->build(