my %params; $params{param1} = $param1; $params{param2} = $param2; my %options; $options{INCLUDE_PATH} = '/var/www/html/test'; my $msg = MIME::Lite::TT::HTML->new( From => 'me@domain.com', To => 'user@domain.com', Subject => "Test", Template => { html => 'template.html.tt', text => 'template.txt.tt', }, TmplOptions => \%options, TmplParams => \%params, ); # Set our content type properly $msg->attr("content-type" => "multipart/mixed"); $msg->attach( Type => 'application/msexcel', Path => '/var/www/cgi-bin/test/test.xls', Filename => 'test.xls', Disposition => 'attachment' ); $msg->send('smtp', 'smtp.domain.com', Timeout=>60);