subject => qq{Your Subject Here},
body => qq{Body Body Body}
};
- $c->forward('View::Email');
+ $c->forward( $c->view('Email' ) );
}
Alternatively, you can use a more raw interface, and specify the headers as
If the email fails to send, the view will die (throw an exception). After
your forward to the view, it is a good idea to check for errors:
- $c->forward('View::Email');
+ $c->forward( $c->view('Email' ) );
if ( scalar( @{ $c->error } ) ) {
$c->error(0); # Reset the error condition if you need to
$c->res->body('Oh noes!');