Subject: | Plaintext mail using C:V:Email::Template |
When I set the content type to text/plain and forward to Email::Template view, I get a
text/html mail. Controller code:
$c->stash->{email} = {
to => 'jshirley@gmail.com',
cc => 'abraxxa@cpan.org',
from => 'no-reply@foobar.com',
subject => 'I am a Catalyst generated email',
template => 'test.tt',
content_type => 'text/plain'
};
$c->forward( $c->view('Email::Template') );
I'm able to replicate this by modifying sub template_email in
http://cpansearch.perl.org/src/DHOSS/Catalyst-View-Email-
0.31/t/lib/TestApp/Controller/Root.pm
in the testapp bundled with this dist. But when I set stash->{email}->{templates} to a
single hash array with the template name and content_type, it works:
$c->stash->{email}->{templates} = [ {
template => 'test.tt',
content_type => 'text/plain'
} ];