mat*_*ndr 5 configuration swiftmailer symfony
我试图设置一个空值,app/config/parameters.ini并将其app/config/config.yml用于swiftmailer.encryptionconfig参数.我需要在parameters.ini中设置它,因为我有不同的环境,每个环境都使用不同的邮件配置.
该Symfony的文件说,这个配置参数应该是一个字符串值,并且"有效值为TLS,SSL或空".
我的第一个猜测是添加mailer_encryption="null"到parameters.ini和encryption: %mailer_encryption%config.yml.但这会导致错误:
"InvalidConfigurationException:路径"swiftmailer.encryption"的配置无效:"不支持"null"加密".
如果我在parameters.ini中使用mailer_encryption=null或者mailer_encryption=,我会收到另一个错误:
"InvalidConfigurationException:路径"swiftmailer.encryption"的配置无效:"不支持""加密".
如果我通过更改config.yml来停止引用参数encryption:,它可以工作,但这不能解决我的目标.
我正在使用Symfony 2.0.15,其中包括Swiftmailer.这是2.0分支.
我怎样才能使这个工作?