MailerInterface is not working #57362
-
Symfony version(s) affected7.0.8 DescriptionI am sending mail using the MailerInterface. Sending mail gives no error but the mail is not delivered. When I am using the Mailer and Transport classes directly the mail is delivered. This behavior exists since I use Symfony 7. How to reproduce.env.local
The send method of mailer gives no exception but the mail is not delivered. Possible SolutionWhen I explicitly set the transport to the mailer it mails correctly:
Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Can you create a small example application that allows to reproduce your issue? |
Beta Was this translation helpful? Give feedback.
Based on Mailer component doc and as @MatTheCat mentioned:
if your application has the Messenger component installed, all emails will be sent asynchronously by default
This mean emails are end up as messages to the bus but you can change that https://symfony.com/doc/current/messenger.html#messenger-handling-messages-synchronously