Hi All,
I have been having issues with placing email templates in Silverstripe 3.1
If I use the following:
$email = new Email($from, $to, $subject, $body);
$email->setTemplate('MyEmail');
$email->populateTemplate(Member::currentUser());
$email->send();
Then add the template "MyEmail.ss" into the "/silverstripe-root/themes/mytheme/templates/email" directory, then Silverstripe cannot find it.
If I add "MyEmail.ss" to the "/silverstripe-root/mysite/templates/email" directory, then the template is found.
Anyone else getting this? I have had the same issue on several projects, I set the current theme in config.yml, so not sure what the issue is...
Cheers,
Mo