0

I want to send an email using gmail but it has error as shown:

Message: stream_socket_enable_crypto(): Peer certificate CN=some-address-here did not match expected CN=`127.0.0.1'

Filename: PHPMailer-master/class.smtp.php

Message was not sentMailer Error: SMTP connect() failed.

Kindly help me. Thanks!

cchbv
  • 31
  • 3
  • 9

2 Answers2

1

In drupal following one of its solutions worked for me, you may find your solution in the given link. PHPMailer generates PHP Warning: stream_socket_enable_crypto(): Peer certificate did not match expected

For me, this solution worked, Disable SMTP restrictions in WHM by searching SMTP. I was facing the same issue. Follow the reference, it might help you to find settings.

stream_socket_enable_crypto():

1

0

Probably, you used ssl connection on 465 port instead tls on 587.