Closed rsaenen closed 6 years ago
I discovered this problem today. Swiftmailer bundle was updated from 2.3.11 to 2.6.3. The problem is in EmailSenderListener.php line 53.
if (method_exists($this->container, 'initialized') ? $this->container->initialized(sprintf('swiftmailer.mailer.%s', $name)) : true) {
I can't understand, why checking of initialization is needed here. Maybe, according to this commit https://github.com/symfony/swiftmailer-bundle/commit/05b925e761be2107e2e02073f7df8ee5c952e79c it is only for performance purposes, but i think, before that commit code
$this->container instanceof IntrospectableContainerInterface
always returned false and checking of initialization always passed and email messages was sent correct. Quick fix somewhere in code just initialize all mailers, for example:
foreach ($this->getContainer()->getParameter('swiftmailer.mailers') as $name) {
$this->getContainer()->get($name);
}
Interesting ! I forgot to mention I use swiftmailer/swiftmailer (v5.4.8) and symfony/swiftmailer-bundle (v2.6.7).
In my case problem was that i used Swift_Transport instead Swift_Mailer to send messages. But i still don't understand, why messages had send before upgrading swiftmailer-bundle.
I'm still facing this issue with "symfony/swiftmailer-bundle": "^3.1"
, your merge hasn't been released ?
@dkop do you use mailer with the yaml configuration?
Try to turn off spooler. Your code without swiftmailer-bundle don't use it. Try to update swiftmailer itself (not bundle).
Fixed with symfony/swiftmailer-bundle": "3.2 :1st_place_medal:
Moreover, I found that my SMTP filtered mail which contains link with a different domain that my SMTP email domain.
Hi, According to these documentation:
https://symfony.com/doc/current/email.html
https://swiftmailer.symfony.com/docs/sending.html
Using the Symfony service
@mailer
with the following configuration:I dumped errors when I call
$mailer->send($message, $errors);
and don't get any errors.However no email is sent...
When I don't use the Symfony service, the email is sent:
I searched for many configurations and still don't get why the service doesn't send the email...