This will probably scare you, but i'd rather show someone the right way than the "just get it done" way. You don't have to use HTML::Template, you can still use your $myInfo variable, but do consider using MIME::Lite.
use strict; use warnings; use MIME::Lite; use HTML::Template; my $t = HTML::Template->new(filehandle => \*DATA); $t->param( field => 'foo', data => 'bar', ); my $msg = MIME::Lite->new( From =>'me@myhost.com', To =>'you@yourhost.com', Subject =>'Hello HTML', Data => $t->output, # you can just use $myInfo here instead Type =>'text/html', ); $msg->send; __DATA__ <html> <body> <h1>Hello HTML!</h1> <table> <tr> <td><tmpl_var field></td> <td><tmpl_var data></td> </tr> </table> </body> </html>
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: email output using HTML format.
by jeffa
in thread email output using HTML format.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |