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__

Hello HTML!

####