MIME::Lite::TT(3pm)

MIME::Lite::TT3pm

Tt enabled mime::lite wrapper

Usage

  use MIME::Lite::TT;
  my $msg = MIME::Lite::TT->new(
              From => '[email protected]',
              To => '[email protected]',
              Subject => 'Hi',
              Template => \$template,
              TmplParams => \%params, 
              TmplOptions => \%options,
            );
  $msg->send();

Overview

MIME::Lite::TT is the wrapper of MIME::Lite which enabled Template::Toolkit as a template of email.

Options

Template

The same value passed to the 1st argument of the process method of Template::Toolkit is set to this option.

TmplParams

The parameter of a template is set to this option. This parameter must be the reference of hash.

TmplOptions

configuration of Template::Toolkit is set to this option. ABSOLUTE and RELATIVE are set to 1 by the default.

TmplUpgrade

template is force upgraded. (means utf-8 flag turns on)

Sample

 use MIME::Lite::TT;
 
 my $template = <<TEMPLATE;
 This is template.
 my name is [% name %].
 
 TEMPLATE
 
 my %params = (name => 'horiuchi');
 my %options = (EVAL_PERL=>1);
 
 my $msg = MIME::Lite::TT->new(
             From => '[email protected]',
             To => '[email protected]',
             Subject => 'hi',
             Template => \$template,
             TmplParams => \%params,
             TmplOptions => \%options,
           );
 $msg->send();

Releases

5 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9–10
  2. 11
  3. 12–13

Author

Author <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From libmime-lite-tt-perl 0.02-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.