MIME::...::HTML(3pm)
π MIME::Lite::TT::HTML π
okay bestie, sit DOWN, because we're talking about MIME::Lite::TT::HTML β the Perl module that lets you build html emails with MIME::Lite and TT (that's Template::Toolkit, iykyk). it's giving elegant, it's giving convenient, and it's literally right here in your perl 3pm pages. no cap. π¦
β¨ SYNOPSIS β¨
use MIME::Lite::TT::HTML;
my $msg = MIME::Lite::TT::HTML->new(
From => 'from@example.com',
To => 'to@example.com',
Subject => 'Subject',
TimeZone => 'Asia/Shanghai',
Encoding => 'quoted-printable',
Template => {
html => 'mail.html',
text => 'mail.txt',
},
Charset => 'utf8',
TmplOptions => \%options,
TmplParams => \%params,
);
$msg->send;
like. look at that. that's the whole vibe right there. πΈ
π DESCRIPTION π
this module provides an easy interface to make a MIME::Lite object with html formatted mail. that's it, that's the whole thing, and honestly? iconic. π
π METHODS π
newβ returns aMIME::Liteobject with html mail format. boom. main character behavior. π
π«Ά ADITIONAL OPTIONS π«Ά
π Template
the same value passed to the 1st argument of the process method of Template::Toolkit is set to this option. yes bestie, the same value, exactly.
π TmplParams
the parameter of a template is set to this option. this parameter must be the reference of hash. must. be. a. hashref. π
π TmplOptions
configuration of Template::Toolkit is set to this option. ABSOLUTE and RELATIVE are set to 1 by the default.
π TimeZone
you can specified the time zone of the mail date:
TimeZone => 'Asia/Shanghai',
default using 'UTC' if not defined.
π Encoding
mail body will be encoded for tranfer.
Use encoding: | If your message contains:
------------------------------------------------------------
7bit | Only 7-bit text, all lines <1000 characters
8bit | 8-bit text, all lines <1000 characters
quoted-printable | 8-bit text or long lines (more reliable than "8bit")
base64 | Largely non-textual data: a GIF, a tar file, etc.
default using '7bit' if not defined.
π Charset
you can specified the charset of your mail β both subject and body will using the charset to make mail reader's client satisfied. π₯°
Charset => 'big5',
and, if you giving the orignal words as UTF8 and attempt to mail them as GB2312 charset, you can define the charset like:
Charset => [ 'utf8' => 'gb2312' ],
we will using Encode to make this happy. π§
π AUTHOR π
Sheng Chun <chunzi@cpan.org>
π SEE ALSO π
MIME::Lite::TT MIME::Lite::TT::Japanese MIME::Lite::TT::HTML::Japanese
πΈ LICENSE πΈ
this library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
π POD ERRORS π
hey! the above document had some coding errors, which are explained below. (not me reading the compiler's receipts π«£)
Around line 50:
You forgot a '=back' before '=head1'
Around line 176:
=back without =over
and that's a wrap, bestie! this whole page was served up by perl v5.42.0, dated 2025-07-25, from the MIME::...::HTML(3pm) manual. slay, stay hydrated, and go send some gorgeous html mail. πβ¨π
π¦ where this page comes from
- fedora 43: perl-MIME-Lite-TT-HTML 0.04-32.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms