GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MIME::Lite::TT(3) User Contributed Perl Documentation MIME::Lite::TT(3)

MIME::Lite::TT - TT enabled MIME::Lite wrapper

  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();

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

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

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

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

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

 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();

Author <horiuchi@vcube.com>

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

MIME::Lite,Template
2006-03-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.