• Resolved chilliwebsites

    (@chilliwebsites)


    I have used the plugin: WP Mail SMTP on a number of occasions for clients. I have two clients at the moment that the plugin just will not work for. I have tried all sorts of port numbers, spoken to my hosting company, Domain company etc and they still don’t work.
    Both are with Microsoft Office 365 now for email.

    This is the error I get after trying to send a test email.

    Versions:
    WordPress: 5.7.2
    WordPress MS: No
    PHP: 7.3.29
    WP Mail SMTP: 2.9.0
    
    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not authenticate.
    Host: smtp.office365.com
    Port: 587
    SMTPSecure: tls
    SMTPAutoTLS: bool(true)
    SMTPAuth: bool(true)
    
    Server:
    OpenSSL: OpenSSL 1.1.1k 25 Mar 2021
    
    Debug:
    Mailer: Other SMTP
    SMTP Error: Could not authenticate.
    
    SMTP Debug:
    2021-07-14 06:57:39 Connection: opening to smtp.office365.com:587, timeout=300, options=array()
    
    2021-07-14 06:57:39 Connection: opened
    
    2021-07-14 06:57:39 SERVER -> CLIENT: 220 SYBPR01CA0032.outlook.office365.com Microsoft ESMTP MAIL Service ready at Wed, 14 Jul 2021 06:57:48 +0000
    
    2021-07-14 06:57:39 CLIENT -> SERVER: EHLO leadingedgelifeskills.com.au
    
    2021-07-14 06:57:39 SERVER -> CLIENT: 250-SYBPR01CA0032.outlook.office365.com Hello [114.141.201.100]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
    
    2021-07-14 06:57:39 CLIENT -> SERVER: STARTTLS
    
    2021-07-14 06:57:39 SERVER -> CLIENT: 220 2.0.0 SMTP server ready
    
    2021-07-14 06:57:40 CLIENT -> SERVER: EHLO leadingedgelifeskills.com.au
    
    2021-07-14 06:57:40 SERVER -> CLIENT: 250-SYBPR01CA0032.outlook.office365.com Hello [114.141.201.100]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
    
    2021-07-14 06:57:40 CLIENT -> SERVER: AUTH LOGIN
    
    2021-07-14 06:57:40 SERVER -> CLIENT: 334 VXNlcm5hbWU6
    
    2021-07-14 06:57:40 CLIENT -> SERVER: [credentials hidden]
    
    2021-07-14 06:57:40 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
    
    2021-07-14 06:57:40 CLIENT -> SERVER: [credentials hidden]
    
    2021-07-14 06:57:45 SERVER -> CLIENT: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [SYBPR01CA0032.ausprd01.prod.outlook.com]
    
    2021-07-14 06:57:45 SMTP ERROR: Password command failed: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [SYBPR01CA0032.ausprd01.prod.outlook.com]
    
    SMTP Error: Could not authenticate.
    
    2021-07-14 06:57:45 CLIENT -> SERVER: QUIT
    
    2021-07-14 06:57:45 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
    
    2021-07-14 06:57:45 Connection: closed
    
    SMTP Error: Could not authenticate.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @chilliwebsites,

    Thank you for reaching out, and I’m sorry to hear about the error here.

    When you get the chance, could you please make sure you’re using an App Password instead of your regular Microsoft Office 365 account? In case it helps, here’s guide on how to create an App Password.

    Please also check if your Office 365 account has SMTP Auth disabled. Here are the steps to check:

    1. Open the Microsoft 365 admin center and go to Users > Active users.
    2. Select the user, and in the flyout that appears, click Mail.
    3. In the Email apps section, click Manage email apps.
    4. Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.
    5. When you’re finished, click Save changes.

    For more details on that, please follow this guide.

    In case it helps, here’s our documentation for setting up the Other SMTP mailer.

    I hope this helps!

    Thanks! ??

    Thread Starter chilliwebsites

    (@chilliwebsites)

    Thanks Justin for getting back to me with this info. You are correct we have not used a APP password. I will have to pass this onto the client to organise this as I don’t control the email account. Do I HAVE to use “Microsoft SMTP” with 365 email or can I use “Other SMTP” within the plugin? I have used “other” in the past however I wondered if this has now changed with the latest update?

    Hi @chilliwebsites,

    I want to first off apologize for the late reply.

    Yes, it is possible to use the Other SMTP mailer option to connect to your Office 365 / Outlook email account. However, depending on your server configurations, you may run into server-related issues such as blocked ports, Firewall related issues, and ModRewrite issues, etc. In these cases, you may be able to reach out to your website hosting provider to get the issue resolved.

    In this case, your account has SMTP Authentication disabled. You can visit this Microsoft documentation for more information.

    We recommend using the Outlook mailer option in WP Mail SMTP because it makes use of Microsoft’s API, which is more reliable, secure, and does not often encounter server-related issues.

    Thank you!

    Hi @chilliwebsites,

    We haven’t heard from you in about a week, so I’m going to go ahead and mark this ticket resolved. If you still have questions, though, please feel welcome to continue the conversation.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SMTP error email can’t be authenticated’ is closed to new replies.