Perl Module - MIME::Lite::TT::HTML test.html.tt: not found -


i trying send mail using mime::lite::tt::html.

this perl script.

#!/usr/bin/perl use cpaneluserconfig;   use strict;  use warnings;  use mime::lite::tt::html;   %params;   $params{first_name} = 'frank';  $params{last_name}  = 'wiles';  $params{amt_due}    = '24.99';   %options;  $options{include_path} = '.';   $msg = mime::lite::tt::html->new(                    =>  'cs@pzr.com',                      =>  'xyz@gmail.com',             subject     =>  'your new password',             template    => { html => 'test.html.tt' },             tmploptions =>  \%options,             tmplparams  =>  \%params,  );   $msg->send; 

i created file named test.html.tt in same directory. content of is:

     <html>  <body>   <strong>hi [% first_name %]</strong>,   <p>  confirm purchase of $ [% amt_due %].  </p>   <p>  thank you!  </p>  </body>  </html> 

but while executing script seeing error:

[wed sep 30 11:09:06.557523 2015] [cgi:error] [pid 40187:tid 140571450533632] [client 123.136.217.67:49857] ah01215: file error - test.html.tt: not found: /home//public_html/orders/cgi-bin/testmail.pl

how solve this?

you created test.html.tt in same directory script, that's not directory told tt into. fix:

use findbin qw( $realbin );  $options{include_path} = $realbin; 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -