I am trying to send an email as HTML using HTML template. Does anybody know
that how can I use HTML template (that resides in view directory) as email
body? So far I tried the following code but am not able to get it working.
It may be not the right way of doing it.
try {
email {
from => 'abc@xyz.com',
to => 'xyz@abc.com',
subject => 'test email',
body => template 'contactUsEmail.tt', {name => $params->{'name'},
email => $params->email'}, message => $params->{'message'}},
type => 'html'
};