• Resolved mrwalt

    (@mrwalt)


    Hi,

    When sending a test email I am getting the error:

    Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=site.nh-serv.co.uk' did not match expected CN=smtp.office365.com’ [/home/site/public_html/wp-includes/PHPMailer/SMTP.php line 457]

    The correct username, password and smtp host info for office 365 have been entered. Any help is appreciated.

    Thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Noor Alam

    (@naa986)

    @mrwalt, What happens if you “Disable SSL Certificate Verification” in the settings?

    Thread Starter mrwalt

    (@mrwalt)

    Hi @naa986,

    Thanks for getting back to me so quickly!

    I am getting an authentication error:
    SMTP ERROR: Password command failed: 535 Incorrect authentication data
    SMTP Error: Could not authenticate.

    I am starting to think it is a server error rather than the plugin.

    Again thanks for your time

    Plugin Author Noor Alam

    (@naa986)

    @mrwalt, If the password is correct I think I know why this is happening. You’re asking to connect to smtp.office365.com, but your server is actually connecting to site.nh-serv.co.uk. Obviously the TLS certificate for that doesn’t match office365’s domain name, and so it fails

    You should re-enable SSL Certificate Verification and contact your web host regarding this error:

    Error #2: stream_socket_enable_crypto(): Peer certificate CN=site.nh-serv.co.uk’ did not match expected CN=smtp.office365.com’ [/home/site/public_html/wp-includes/PHPMailer/SMTP.php line 457]

    Thread Starter mrwalt

    (@mrwalt)

    Thanks @naa986 I will do that!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Connection failed. Error #2 office 365’ is closed to new replies.