symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

RuntimeException where dev defines cafile location #275

Closed scottgutman closed 2 years ago

scottgutman commented 5 years ago

After upgrading a symfony project, I got an error parsing the config for swiftmailer. The item that seemed to be causing the issue was "cafile". I had stream_options defined in both config.yml and config-dev.yml. Only in the dev file I added the cafile item. On upgrade it caused an issue.

My config.yml has this:

swiftmailer:
    transport: "%mailer_transport%"
    host:      "%mailer_host%"
    username:  "%mailer_user%"
    password:  "%mailer_password%"
    auth_mode: "%mailer_auth_mode%"
    port:      "%mailer_port%"
    encryption: "%mailer_encryption%"
#    spool:     { type: memory }
    logging:  true
    stream_options:
        ssl:
            allow_self_signed: true
            verify_peer: false
            verify_peer_name: false

but my config_dev.yml has this:

swiftmailer:
    spool:     { type: memory }
    stream_options:
        ssl:
            allow_self_signed: true
            verify_peer: false
            verify_peer_name: false
            cafile: "C:\\php7\\cacert.pem"

Notice the extra line for the "cafile" that is not in the config.yml.

Why should this make a difference?

fabpot commented 2 years ago

Closing as this bundle is not maintained anymore.