Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3919

Symfony 4 + Swift Mailer [closed]

$
0
0

I'd like to use the bundle Swift Mailer to send templated mails, but all documentations I find (including https://symfony.com/doc/4.3/email.html) doesn't seem to work...

My .env file is configured this way:

MAILER_URL=smtp://localhost:25?encryption=&auth_mode=

I've tried several ways to use the service:

public function __construct(\Swift_Mailer $mailer)
{
    $this->mailer = $mailer;
}

And I have the same error each time:

$mailing = new Mailing();

Too few arguments to function App\Service\Mailing::__construct(), 
0 passed in /[...]/ReportController.php on line 128 and exactly 1 expected

Any idea of what may be missing?


Viewing all articles
Browse latest Browse all 3919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>