• Resolved chazg

    (@chazg)


    The [email protected] inbox is setup using Office365.
    When I fill out any of the contact form on the Contact Us page and hit Submit, it does not send. The WP Mail SMTP settings are correct. I am using:
    From Email: [email protected]
    SMPT Host: smtp.office365.com
    SMTP Port: 25
    Encryption: None
    Authentication: On
    SMPT Username: [email protected]
    SMPT Password: (what ever the password is)

    When I click on the Email Test tab and send a test email, I get the following error message:

    Versions:
    WordPress: 4.9.1
    WordPress MS: No
    PHP: 7.0.27
    WP Mail SMTP: 1.2.4

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.office365.com
    Port: 25
    SMTPSecure: string(0) “”
    SMTPAutoTLS: bool(false)
    SMTPAuth: bool(true)

    Server:
    OpenSSL: Yes
    SMTP Debug:
    2018-02-02 10:09:58 Connection: opening to smtp.office365.com:25, timeout=300, options=array (
    )
    2018-02-02 10:09:58 Connection: opened
    2018-02-02 10:09:58 SERVER -> CLIENT: 220 LNXP265CA0024.outlook.office365.com Microsoft ESMTP MAIL Service ready at Fri, 2 Feb 2018 10:09:57 +0000
    2018-02-02 10:09:58 CLIENT -> SERVER: EHLO https://www.gorillascaffolding.com
    2018-02-02 10:09:58 SERVER -> CLIENT: 250-LNXP265CA0024.outlook.office365.com Hello [77.104.173.38]
    250-SIZE 157286400
    250-PIPELINING
    250-DSN
    250-ENHANCEDSTATUSCODES
    250-STARTTLS
    250-8BITMIME
    250-BINARYMIME
    250-CHUNKING
    250 SMTPUTF8
    2018-02-02 10:09:58 SMTP Error: Could not authenticate.
    2018-02-02 10:09:58 CLIENT -> SERVER: QUIT
    2018-02-02 10:09:58 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
    2018-02-02 10:09:58 Connection: closed
    2018-02-02 10:09:58 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    I was advised Salva to do the following:
    1) Update the plugin to the latest version.
    2) Contact your hosting support

    You might need to change the SMTP Host to some kind of relay (hosting should you provide all the correct values, ask them).

    I contacted the hosting company and this is what they said:
    I checked your case and it seems that the WP mail SMTP plugin cannot establish connection due to incorrect login details:

    Code:
    2018-02-01 13:56:10 SMTP Error: Could not authenticate.
    2018-02-01 13:56:10 CLIENT -> SERVER: QUIT
    2018-02-01 13:56:10 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
    2018-02-01 13:56:10 Connection: closed
    2018-02-01 13:56:10 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    However, I managed to successfully login into your office365.com account with the same username and password.

    I also verified that the connection towards smtp.office365.com can be established via port 25:

    Code:
    bigbears@uk38 [~]# telnet smtp.office365.com 25
    Trying 40.101.73.162…
    Connected to smtp.office365.com.
    Escape character is ‘^]’.
    220 DB6PR07CA0170.outlook.office365.com Microsoft ESMTP MAIL Service ready at Thu, 1 Feb 2018 13:41:30 +0000

    I reviewed the settings of your SMTP plugin and I would like to confirm that they are properly configured.

    What I can recommend you in this case is to either re-install the WP mail SMTP plugin or use another one with similar functionalities

    Please verify the results on your end and let us know if we can be of further assistance.

    I’m not sure what to do now. I have tried installing another plugin and i get the same error on that too…
    CLIENT -> SERVER: EHLO https://www.gorillascaffolding.com
    SMTP Error: Could not authenticate.CLIENT -> SERVER: QUIT
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Can someone please help thanks.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    I think, their reply should be posted in the initial forum topic, not a new one.

    Try port 587 and encryption TLS. See here: https://take.ms/bVq7Q

    Thread Starter chazg

    (@chazg)

    When I change the port to 587 and send a test email, i get the following error message:

    There was a problem while sending a test email. Related debugging output is shown below:

    Versions:
    WordPress: 4.9.1
    WordPress MS: No
    PHP: 7.0.27
    WP Mail SMTP: 1.2.4

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.office365.com
    Port: 587
    SMTPSecure: string(0) “”
    SMTPAutoTLS: bool(false)
    SMTPAuth: bool(true)

    Server:
    OpenSSL: Yes
    SMTP Debug:
    2018-02-02 11:38:05 Connection: opening to smtp.office365.com:587, timeout=300, options=array (
    )
    2018-02-02 11:40:21 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to smtp.office365.com:587 (Network is unreachable)
    2018-02-02 11:40:21 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
    2018-02-02 11:40:21 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Plugin Author Slava Abakumov

    (@slaffik)

    You have NOT changed the encryption to TLS.

    Try port 587 and encryption TLS

    • This reply was modified 6 years, 10 months ago by Slava Abakumov. Reason: fix typo
    Thread Starter chazg

    (@chazg)

    I have made the change and still get the following:

    Versions:
    WordPress: 4.9.1
    WordPress MS: No
    PHP: 7.0.27
    WP Mail SMTP: 1.2.4

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    Host: smtp.office365.com
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)

    Server:
    OpenSSL: Yes
    SMTP Debug:
    2018-02-02 11:53:08 Connection: opening to smtp.office365.com:587, timeout=300, options=array (
    )
    2018-02-02 11:54:08 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to smtp.office365.com:587 (Network is unreachable)
    2018-02-02 11:54:08 SMTP ERROR: Failed to connect to server: Network is unreachable (101)
    2018-02-02 11:54:08 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Plugin Author Slava Abakumov

    (@slaffik)

    Unreachable network pretty much always means that the server your site is on blocks outbound request. That’s a security rule that blocks external requests.
    You will need to contact your hosting support to ask them to either provide a relay server HOST to be able to send emails or modify the rules for your site.

    There is nothing that I can do on plugin’s side.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SMTP Error: Could not authenticate’ is closed to new replies.