Facing an issue with the mailer in pimcore 10.2 is made in symfony5.4. Invalid configuration for path "framework.mailer": "dsn" and "transports" cannot be used together. The setting I have done for the mail
# .env
MAILER_DSN=smtp://user:[email protected]:port
# config/packages/mailer.yaml
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
I didn't set any other mail transport.
#### SYMFONY MAILER TRANSPORTS
# mailer:
# transports:
# main: smtp://user:[email protected]:port
# pimcore_newsletter: smtp://user:[email protected]:port
Error gone when I remove mailer.yaml file. But then mail is not sending.
The problem was in mailer.yaml. It should be like
# config/packages/mailer.yaml
framework:
mailer:
transports:
main: '%env(MAILER_DSN)%'