當我嘗試使用 swiftmailer 和 symfony 發送郵件時,出現此錯誤。stream_socket_client():SSL 操作失敗,代碼為 1。OpenSSL 錯誤消息:錯誤:14090086:SSL 例程:ssl3_get_server_certificate:證書驗證失敗我用 2020-05-20 的 mozilla cacert.pem 文件更新了 cacert.pem。但這沒有任何改變,我不知道要糾正這個問題。您將在下面找到我的 Switfmailer 配置代碼:swiftmailer: default-mailer: mailer mailers: mailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" encryption : "%mailer_encryption%" port: "%mailer_port%" auth_mode: "%mailer_auth%" spool: { type: memory } stream_options: ssl: allow_self_signed: true verify_peer: false verify_peer_name: false還有一個信息,當我的代碼有錯誤時,它會向我發送一封電子郵件,這很好,我收到了電子郵件。有關信息,我使用 monologBundle。swift: type: swift_mailer from_email: 'noreply@******' to_email: '%mailer_alert_prod%' # or list of recipients # to_email: ['[email protected]', '[email protected]', ...] subject: 'An Error Occurred! %%message%%' level: critical formatter: monolog.formatter.html content_type: text/html mailer : mailer這真的很奇怪。
1 回答

米琪卡哇伊
TA貢獻1998條經驗 獲得超6個贊
好吧,我發現了一些東西,我在 config.yml 上添加的選項沒有在 swiftmailer 模塊的初始化時加載。我直接在 swiftmailer 代碼上添加了它,這很有效。我將在 swiftmailer 上打開一個問題。謝謝您的幫助
- 1 回答
- 0 關注
- 219 瀏覽
添加回答
舉報
0/150
提交
取消