I'm having problems using twig templates for email in SF2.
First I created a template file located at MainBundle/Resources/views/Email/InviteNewUsers.twig
Then I displayed the view as the body of my email: $this->get('mailer')->send($this->renderView('MainBundle:Email:InviteNewUsers.twig', array('code' => $invite->getCode())));
Unfortunately, this causes an error: Unable to find template "MainBundle:Email:InviteNewUsers.twig"
Is there something wrong with my file location or my render command?
It was assumed that I might need a type in the template name, so I tested it with InviteNewUsers.txt.twig and got the same error.
source share