Attempted to call an undefined method named "newInstance" of class "Swift_Message" : <p>Since a few days I can't send email anymore using Symfony and Swiftmailer, though I'm using the code from the documentation </p>

<pre><code>private function _sendResetPasswordEmail(UserInterface $user)
{   
    $subject = $this-&gt;get('translator')-&gt;trans('email-title-reset-password');
    $message = \Swift_Message::newInstance()
        -&gt;setSubject($subject)
        -&gt;setFrom('contact@example.com')
        -&gt;setTo($user-&gt;getEmail())
        -&gt;setBody(
            $this-&gt;renderView(
                'reset-password-email.html.twig',
                ['user' =&gt; $user]
            ),
            'text/html'
        )
    ;
    $this-&gt;get('mailer')-&gt;send($message);
}   
</code></pre>

<p>and it used to work</p>

<p>and now I can see in the logs</p>

<pre><code>"Attempted to call an undefined method named "newInstance" of class "Swift_Message"
</code></pre>

<p>what could have changed ?</p>
