Take the 2-minute tour ×  I'm trying to send a list of IPs from
a Postgres query via e-mail.  I found MIME::Lite::TT and now
have that installed and working. I'd like to pass 20-30 IPs out
in each e-mail in a line feed delimited list. I could do it by
generating a new .txt template for each e-mail I need to send,
but that seems inefficient. I found Template on cpan, and I
think the @list part is what I need, but I don't have any idea
how to implement it.  Passing $params{ips} =
"\n2.3.4.5\n3.4.5.6\n" didn't work either.  Thanks for your
thoughts.  This code sends a single IP successfully:
#!/usr/bin/perl -w use MIME::Lite::TT;  # SendTo email id my
$email = 'tester@mydomain.org';  my %params; $params{ips} = "";
# create a new MIME Lite based email my $msg =
MIME::Lite::TT->new Subject => "HTML email test", From    =>
'admin@mydomain.org', To      => $email, Type    => 'text/html',
Template => 'test.txt', TmplParams => \%params   share|improve
this question add comment  1 Answer  up vote 1 down vote
accepted