MIME::...::HTML(3pm)

πŸ“¦
version 0.04 Β· 2 versions
, in fedora 43

πŸ’– 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 a MIME::Lite object 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