i'm trying to send a mail with Symfony in a controller. Here is my code:
public function testSendMailAction() {
$mailer = $this->container->get('mailer');
$message = (new \Swift_Message('Hello Email'))
->setFrom('an.email@gmail.com')
->setTo('another.email@gmail.com')
->setBody('You should see me from the profiler!')
;
$mailer->send($message);
return new JsonResponse("Tried to send mail");
}
omg, downgrade is not a solution.
can somebody involved please answer to this issue with a correct solution for the latest version?
its open since 1 year......
Hello !
i'm trying to send a mail with Symfony in a controller. Here is my code:
The configuration:
The error i get:
My composer.json:
Can anyone help me please ?