in reply to email output using HTML format.
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: email output using HTML format.
by cees (Curate) on May 09, 2005 at 20:03 UTC | |
|
Re^2: email output using HTML format.
by Anonymous Monk on May 09, 2005 at 18:53 UTC |