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
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users