MIME::Lite::TT - TT enabled MIME::Lite wrapper
Contents
Aditional 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)
Description
MIME::Lite::TT is the wrapper of MIME::Lite which enabled Template::Toolkit as a template of email.
Name
MIME::Lite::TT - TT enabled MIME::Lite wrapper
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 => 'me@myhost.com',
To => 'you@yourhost.com',
Subject => 'hi',
Template => \$template,
TmplParams => \%params,
TmplOptions => \%options,
);
$msg->send();
See Also
MIME::Lite,Template
perl v5.34.0 2022-06-15 MIME::Lite::TT(3pm)
Synopsis
use MIME::Lite::TT;
my $msg = MIME::Lite::TT->new(
From => 'me@myhost.com',
To => 'you@yourhost.com',
Subject => 'Hi',
Template => \$template,
TmplParams => \%params,
TmplOptions => \%options,
);
$msg->send();
