-
-
Notifications
You must be signed in to change notification settings - Fork 152
Using an env var for the disable_delivery option doesn't work as expected #290
Comments
Probably that value is read at container build time to change a service definition. It would likely require some reworking so that it’s read at runtime. |
That's what my analysis showed. I was going to try to create a simple fix and just submit a PR but it looks like the way to solve it likely involves storing the value in parameters and referencing it at runtime when attempting to send mail instead. |
I have not been able to disable/enable mail delivery with Env vars on a project with Symfony 4.3.4
file config/packages/swiftmailer.yml
file config/services.yml
This config does not work. I solved the problem in creating the parameter in a php file( and removing the parameter from services.yml). file config/services.php
This require to clear the cache. |
Closing as this bundle is not maintained anymore. |
When using a configuration like this:
the value of TEST_MAIL_DISABLE_DELIVERY is ignored, and delivery is always disabled. Furthermore, if that env var isn't used anywhere else, the container will fail to build saying that this variable is unused.
The only solution I have right now is use php for the configuration, parse out the env value manually, and assign the value that way. But, this setting should use the env var value like any other.
The text was updated successfully, but these errors were encountered: