in reply to HTML Template Help!

The potentially obvious issue is that you have my $mail_body = $template; in place of my $mail_body = $template->output; as documented in HTML::Template. I'm also not sure why you have CGI in there or where you are getting sendmail from (that's not MIME::Lite's interface), but perhaps this is more of what you need (does not run):

#!/usr/bin/perl use strict; use CGI qw(-oldstyle_urls :standard); use CGI::Carp qw(fatalsToBrowser); use Date::Calc qw( Add_Delta_Days Decode_Date_US Today ); use HTML::Template; my $template = HTML::Template->new( filehandle => *DATA); print "<h3>Email Test</h3>"; my $from = 'test@test.com'; my $to_name = 'Test Form'; my @mail_to = ( 'me@test.com' ); my $subject = "TEST TEMP\n\n"; # template parameters my $f_name = "Joe"; my $date = "02/08/2011"; my $acc = "123455667889"; my $company = "Test Company."; $template->param(f_name => $f_name); $template->param(date => $date); $template->param(acc => $acc); $template->param(company => $company); my $mail_body = $template->output; # Corrected sendmail( \@mail_to, $subject, $mail_body, $from, $to_name ); print "\nDONE\n"; __DATA__ <table width=\"100%\" border=\"0\" bgcolor=\"#ffffff\" cellpadding=\"0 +\" cellspacing=\"0\"> <tr> <td width=\"100%\"colspan=\"2\">&nbsp;</td> </tr> <tr> <td width=\"100%\" colspan=\"2\"><b>Test</b></td> </tr> <tr> <td width=\"30%\">&nbsp;</td><td width=\"70%\">&nbsp;</td> </tr> <tr> <td width=\"30%\">Name:</td><td width=\"70%\"><TMPL_VAR NAME=" +f_name">.</td> </tr> <tr> <td width=\"30%\">EDate:</td><td width=\"70%\"><TMPL_VAR NAME= +"date">.</td> </tr> <tr> <td width=\"30%\">Acc:</td><td width=\"70%\"><TMPL_VAR NAME="a +cc">.</td> </tr> <tr> <td width=\"30%\">Company:</td><td width=\"70%\"><TMPL_VAR NAM +E="company">.</td> </tr> </table>