PHPMailer generates PHP Warning: stream_socket_enable_crypto(): Peer certificate did not match expected

后端 未结 4 955
南旧
南旧 2020-11-27 03:50

I am using PHPMailer on PHP 5.6, the increased security around certificated in PHP 5.6 is certainly fun.

I am trying to send a test message to a domain hosted on dre

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 04:54

    For those of you using cPanel, I tried the SMTP check code from the examples folder in PHPMailer and I got this same error:

    PHP Warning: stream_socket_enable_crypto(): Peer certificate  CN=*.mail.dreamhost.com' did not match expected CN=mx1.sub4.homie.mail.dreamhost.com' in /home/ikbb/domains/dev.ikbb.com/public_html/includes/phpmailer/5.2.10/class.smtp.php
    

    I realized that it was not an error related to PHPMailer, so I searched for similar errors related to CentOS and I found this link that shed some light: Issue sending mails through 3rd party. You have to take a look at "SMTP Restrictions" in cPanel.

提交回复
热议问题