The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MIME::Lite::TT::HTML::Japanese - Template-Toolkit によるHTMLメール作成モジュール

SYNOPSIS

    use MIME::Lite::TT::HTML::Japanese;

    my $msg = MIME::Lite::TT::HTML::Japanese->new(
        From        => 'from@example.com',
        To          => 'to@example.com',
        Subject     => 'Subject',
        Template    => {
            html => 'mail.html',
            text => 'mail.txt',
        },
        TmplOptions => \%options,
        TmplParams  => \%params,
        Icode       => 'euc',    # input characterset (Jcode format)
        TmplIcode   => 'jis',    # Template characterset (Optional)
    );
    
    $msg->send;

DESCRIPTION

MIME::LiteTemplate をつかって HTML メールを作成するモジュール。

METHODS

new( %options )

%option を元に MIME::Lite でメールを作成し、その MIME::Lite オブジェクトを返す。

%option の値で、このモジュール特有のものは

Template

ハッシュリファレンス。ここで html テンプレートと text テンプレートを指定する。

html テンプレートは必須。text テンプレートは指定されなかった場合、html から自動作成される。

TmplOptions

Template モジュールへ渡すオプション。

TmplParams

Template へ渡すパラメータ。

Icode

入力文字コード。(たいていはプログラム自体の文字コード) Jcode のフォーマット(euc|sjis|jis|utf8)で渡す。

TmplIcode

テンプレートの文字コード。Icode と異なる場合に指定する。

で、それ以外の値はそのまま MIME::Lite に渡される。

AUTHOR

Daisuke Murase <typester@cpan.org>

LICENSE

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

SEE ALSO

MIME::Lite, Template, MIME::Lite::TT::Japanese