2 Mar
2016
2 Mar
'16
6:32 p.m.
On 3/2/16 11:00 AM, Hugues wrote:
Hello I'm using Dancer + Dancer::Plugin::Email
Do you know if it's possible to send a email using template with template toolkit ? and passe variable to this template ?
Hugues, Yep. Just capture the output of template into a scalar and pass that to email. my $email_body = template "template-file.tt", $variables, { layout => undef }; email { from => $from, to => $to, subject => "Your Subject Line", body => $email_body, type => "html", }; Dan -- Dan Busarow BuildingOnline.com http://www.BuildingOnline.net/ 888-496-6648 ext 218