Having some problems implementing swiftmailer with the new symfony2 beta4, below is my code
$mailer = $this->container->get('mailer');
$name = ucwords(str_replace('.',' ', $user->getScreenName()));
$email = '[email protected]'; //$user->getEmail();
$message = $mailer::newInstance()
->setSubject('New Password')
->setFrom('Neokeo <[email protected]>')
->setTo("$name <$email>")
->setBody($this->renderView('MyBundle:User:reset.html.php', array('user',$user)));
$mailer->send($message);
and the error
Catchable fatal error: Argument 1 passed to Swift_Mailer::newInstance() must implement interface Swift_Transport, none given
does anyone have any idea what i can do to fix this?