[dancer-users] How to use HTML template as body to an Email?

Andrew Beverley andy at andybev.com
Tue Jan 26 23:54:30 GMT 2016


On Tue, 2016-01-26 at 13:57 -0500, Tushar Dave wrote:
> 
> try {
>     email {
>         from => 'abc at xyz.com',
>         to => 'xyz at abc.com',
>         subject => 'test email',
>         body => template 'contactUsEmail.tt', {name => $params->{'name'},

                        ^^^^

Only guessing, but I suspect you're going to have problems with
precedence here. Try adding some brackets. E.g.

  body => template('contact..', {...} )





More information about the dancer-users mailing list