I am trying to set a null value in app/config/parameters.ini
and use it in app/config/config.yml
for the swiftmailer.encryption
config parameter. I need to set it in parameters.ini because I have different environments that each use different mail configuration.
The Symfony documentation says that this config parameter should be a string value and that "valid values are tls, ssl, or null".
My first guess would be to add mailer_encryption="null"
to parameters.ini and encryption: %mailer_encryption%
to config.yml. But that results in an error:
"InvalidConfigurationException: Invalid configuration for path "swiftmailer.encryption": The "null" encryption is not supported".
If I use mailer_encryption=null
or mailer_encryption=
in parameters.ini, I get another error:
"InvalidConfigurationException: Invalid configuration for path "swiftmailer.encryption": The "" encryption is not supported".
If I stop referencing the parameter by changing config.yml to encryption:
, it works but this doesn't solve my objective.
I am using Symfony 2.0.15, which includes Swiftmailer with it. This is the 2.0 branch.
How can I get this working?
AFAIK, you can use yml format of parameters file. So try to create parameters.yml and import it to your config.yml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With