use MIME::Lite::TT::HTML;
my $HoH = {
item_hoh => {
row1 => { index => 99, col1 => "Col 1", col2 => "Col 2" },
row2 => { index => 42, col1 => "Col 1", col2 => "Col 2" },
}
};
my $msg = MIME::Lite::TT::HTML -> new(
From => 'donotreply@windowsintowaukesha.com',
To => 'you@foo.bar',
Subject => 'Bid Strategy System - Final Pricing Approval',
Template => {
html => 'email_bid_strategy_final_appr.tt',
},
TmplParams => $HoH,
);
####
[% FOREACH record IN item_hoh.values.nsort('index') %]
| [% record.index %] |
[% record.col1 %] |
[% record.col2 %] |
[% END %]
####
...
$tt->process( $template->{html}, $tmpl_params, \$html ) or croak $tt->error;
print STDERR $html; # <---
...
####
| 42 |
Col 1 |
Col 2 |
| 99 |
Col 1 |
Col 2 |