How to disable “verify_peer” with Symfony Mailer component?

后端 未结 3 1445
轻奢々
轻奢々 2021-01-11 18:06

I\'m configuring a mail server (postfix), with a self signed certificate, and it seems this self signed certificate is a problem for the Symfony Mailer component.

On

3条回答
  •  渐次进展
    2021-01-11 18:20

    This option will been enabled when this pull request, which has been already merged into master, is tagged and released.

    So it seems you would have to wait for the next Symfony release (this was merged into the 5.1 branch, so it doesn't look like it's going to be available in the 4.x branch at all), and then you will able to do this by adding verify_peer to your Mailer DSN configuration.

    Regularly, you'll be able configure Mailer, you need only to create a MAILER_DSN environment variable (usually setting the value on one of your .env files is enough).

    In a near future, you'll be able to do this:

    MAILER_DSN=smtp://user:pass@localhost?verify_peer=false
    

    But right now (as of 4.4.4 and 5.0.4) you can't do this natively with Symfony Mailer.

提交回复
热议问题