symfony-mailer

How to translate emails when sending them asynchronously with Symfony Messenger?

我是研究僧i 提交于 2021-02-16 14:11:54
问题 I configured the Symfony mailer to send emails with messenger. https://symfony.com/doc/current/mailer.html#sending-messages-async I have my emails in two languages and I rely on the requests to detect the language, but now the emails are not translated. How can I get the messages to be translated in the language detected in the request? In my controller: $mailer->send( $user->email, $this->translator->trans('mails.recover.subject'), 'email/client/password-recovery.html.twig', compact('user',

Symfony messenger and mailer : how to add a binding_key?

╄→尐↘猪︶ㄣ 提交于 2021-02-10 20:21:54
问题 I have a running Symfony 4.4 project with messenger and rabbitMQ. I have an async transport with 2 queues. transports: # https://symfony.com/doc/current/messenger.html#transport-configuration async: dsn: '%env(MESSENGER_TRANSPORT_DSN)%' options: exchange: name: myexchange type: direct queues: email: binding_keys: - email extranet: binding_keys: - extranet # failed: 'doctrine://default?queue_name=failed' # sync: 'sync://' routing: # Route your messages to the transports 'App\Message

How to disable “verify_peer” with Symfony Mailer component?

南楼画角 提交于 2020-03-14 11:39:40
问题 I'm configuring a mail server (postfix), with a self signed certificate, and it seems this self signed certificate is a problem for the Symfony Mailer component. On Swiftmailer, using some configuration such as: transport: stream_options: ssl: allow_self_signed: true or stream_options: ssl: verify_peer: false verify_peer_name: false might fix it, but I can't find a way to do that on mailer (I want to use the YAML configuration files if possible). 回答1: This option will been enabled when this

How to disable “verify_peer” with Symfony Mailer component?

◇◆丶佛笑我妖孽 提交于 2020-03-14 11:38:58
问题 I'm configuring a mail server (postfix), with a self signed certificate, and it seems this self signed certificate is a problem for the Symfony Mailer component. On Swiftmailer, using some configuration such as: transport: stream_options: ssl: allow_self_signed: true or stream_options: ssl: verify_peer: false verify_peer_name: false might fix it, but I can't find a way to do that on mailer (I want to use the YAML configuration files if possible). 回答1: This option will been enabled when this