Symfony 4.4 swift mailer web debug toolbar doesn’t work

After using Swift Mailer to symfony 4.4 web debug toolbar is not working on SEND EMAIL page.
I copied swift mailer code from official documentation from Symfony

output error: An error occurred while loading the web debug toolbar.

Even I disabled mailer configuration in .env file web debug toolbar is not working


MAILER_URL=gmail://[email protected]:[email protected]?encryption=tls&auth_mode=oauth

and configuration


    url: '%env(MAILER_URL)%'
    spool: { type: 'memory' }


 * @Route("/send", name="send_message")
public function index(Swift_Mailer $mailer)
    $name = "Beknur";
    $message = (new Swift_Message('Hello email'))
        ->setFrom('[email protected]')
        ->setTo('[email protected]')
        ->setBody("hi, thanks"


    return $this->render('dashboard/index.html.twig', [
        'controller_name' => 'DashboardController',

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *