lorenzob has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, i'm using MIME::Lite::TT::HTML to send html mail. i got some problem trying to pass to "TmplParams" an array that is content of a file. here is my code:
elsif ($ARGV[0] eq "Errori OMP OVA_LOGGER") { # $mailto = 'some1@somewhere, some2@somewhere, some3@somewhere, +some4@somewhere, some5@somewhere'; $mailto = 'some1@somewhere'; $templ = 'template_errori_omp_ovalogger.html.tt'; open(MYINPUTFILE, "<$data_ovalogger"); my(@lines) = <MYINPUTFILE>; print "@lines\n"; my %params; $params{errori} = \@lines; my %options; $options{INCLUDE_PATH} = '/home/alcatel/.scripts'; $options{INCLUDE_PATH} = '/home/alcatel/.scripts/sendmail'; my $msg = MIME::Lite::TT::HTML->new( From => 'some6@somewhere', To => $mailto, Subject => $ARGV[0], Template => { html => $templ, }, TmplOptions => \%options , TmplParams => \%params , ); $msg->send('smtp', '192.168.16.143', Timeout => 60 ); }
Company email addresses altered by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MIME::Lite::TT::HTML array as tmplparams
by GrandFather (Saint) on Sep 22, 2010 at 04:11 UTC | |
|
Re: MIME::Lite::TT::HTML array as tmplparams
by zwon (Abbot) on Sep 22, 2010 at 02:46 UTC |