Closed ArchieDoe closed 5 years ago
I agree that condition is rather odd.
The whole SwiftmailerExtension
and SwiftmailerTransportFactory
are quite difficult to understand. At one point we are checking that that there's no env vars and configuring transport using a factory, otherwise we use configureMailerTransport
method, which seemingly does the same.
UPD.: Here's a guy suffers from the same weird design: https://github.com/symfony/swiftmailer-bundle/issues/217, so and I did.
I just had the same issue and imho it's not even related to environment vars. The command is just ignored completely. You may check my PR (https://github.com/symfony/swiftmailer-bundle/pull/286) and provide feedback if that fixes it for you.
In
config/packages/swiftmailer.yaml
next configwill not be interpreted properly:
command
property will be omitted.This happens because of next code:
In case of configuration above
$usedEnvs
is always empty, which requires to store some information in.env
file.