I have a email template onecode.mail.php
Which I call from
$body = $view->render(
'template',
compact('users','oneCode','username'),
array(
'controller' => 'users',
'template'=>'onecode',
'type' => 'mail',
'layout' => false
)
);
$transport = Swift_MailTransport::newInstance();
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance();
$message->setSubject("Sign in password");
$message->setFrom(array(NOREPLY => 'Sign in password'));
$message->setTo($email);
$message->setBody($body,'text/html');
$mailer->send($message);
onecode.mail.php contains
<?=$t('Login Email Password')?>
<?=$oneCode?>
I get an error while processing this request as:
<b>Fatal error</b>: Function name must be a string in <b>app\resources
\tmp\cache\templates
\template_views_users_onecode.mail_0_1460392715_2266.php</b> on line <b>1</b><br/>
Translation works perfect in all the .html.php files but not in the template of .email.php
What should be done? Any suggestions, thanks for the help.