in reply to Mime::Lite::TT::HTML Input Hash Name?

If I'm understanding you correctly, the %emailOptions that you're passing to MIME::Lite::TT::HTML has essentially random keys, unknown until runtime. What you need is a key name with which to loop over the ticket info from %emailOptions. Can you modify %emailOptions to be:

my %emailOptions = { tickets => [ { key => '<random ID>', 'queue' = 'Mig', 'priority' = 'high'}, { key => '<random ID 2>', 'queue' = 'Inf', 'priority' = 'high'}, { key => '<random ID 3>', 'queue' = 'Mig', 'priority' = 'low'}, ], };

Then your template would include:

[% FOREACH ticket IN tickets %] <td>[% ticket.key %]</td> <td>[% ticket.queue %]</td> <td>[% ticket.priority %]</td> [% END %]

Replies are listed 'Best First'.
Re^2: Mime::Lite::TT::HTML Input Hash Name?
by doubletb (Initiate) on Oct 04, 2011 at 15:15 UTC

    Thanks for the reply. You understand my problem perfectly, and I'll give your method a shot. It looks like it'll work, although I dislike the redundancy. I'm a little disappointed that the template isn't set up to have an accessible array/hash for those parameters -- like how PERL has @ARGV and @_ arrays for passed-in arguments...