Symfony swiftmailer: mail not sent to prod-environment

I have a symfony 2.8 application with fosuserbundle function. The environment devis sent confirmation of registration, but not in the medium prod. There is no log message and smpt configuration is correct.

sf version: 2.8.1 version of swiftmailer-bundle: current (compatible with sf version; 2.*in json composer) fosuserbundle: 1.3.5 ( *in composer)

Dev configurations:

imports:
    - { resource: config.yml }

framework:
    router:
    resource: "%kernel.root_dir%/config/routing_dev.yml"
    #strict_requirements: true
    profiler: { only_exceptions: true }

web_profiler:
    toolbar: true
    intercept_redirects: true

assetic:
    use_controller: true

Does anyone have the same problem?

change

I just tried mail with the following console command in prodenv:php sf --env=prod swiftmailer:email:send

Terminal output:

#!/usr/bin/env php
From: test@antondachauer.de
To: mail@antondachauer.de
Subject: test
Body: test
Sent 1 emails

But the mail has not been sent. In devenv, it works in the terminal as well.

+4
1

, "gethostbyname" " smtp Gmail", .

, tls ssl stream_options config. , .

parameters.yml

mailer_prod_encryption: tls

config.yml

swiftmailer:
  transport:  "%mailer_dev_transport%"
  host:       "%mailer_dev_host%"
  username:   "%mailer_dev_user%"
  password:   "%mailer_dev_password%"
  encryption: "%mailer_dev_encryption%"
  auth_mode:  "%mailer_dev_auth_mode%"
  spool:     { type: memory }
  port: 25
  stream_options:
    ssl:
      allow_self_signed: true
      verify_peer: false
0

Source: https://habr.com/ru/post/1622780/


All Articles