Since a few days I can't send email anymore using Symfony and Swiftmailer, though I'm using the code from the documentation
private function _sendResetPasswordEmail(UserInterface $user)
{
$subject = $this->get('translator')->trans('email-title-reset-password');
$message = \Swift_Message::newInstance()
->setSubject($subject)
->setFrom('[email protected]')
->setTo($user->getEmail())
->setBody(
$this->renderView(
'reset-password-email.html.twig',
['user' => $user]
),
'text/html'
)
;
$this->get('mailer')->send($message);
}
and it used to work
and now I can see in the logs
"Attempted to call an undefined method named "newInstance" of class "Swift_Message"
what could have changed ?