• Resolved Mustafa

    (@mustafakolkattawala)


    Hello Team,
    Unable to send an email through WP Mail.

    There was a problem while sending the test email.

    My email is on Microsoft 365. in smtp i have putted this smtp.office365.com and username and password. After that its giving me an error could you please help me regarding this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Victoria Sakal

    (@sakalvictoria)

    Hi, @mustafakolkattawala!

    Thanks for getting in touch.

    Please ensure that you’re using the App Password instead of using your account password. In case it helps, here is a guide on how to generate an App Password in Outlook and how to use it.

    If this doesn’t help, could you please share a full error log recorded when you send a test email from WP Mail SMTP > Tools? Here’s a screenshot for the option to get a full error log. This will give us an idea of what might be going on.

    Thank you.

    Thread Starter Mustafa

    (@mustafakolkattawala)

    Hello,

    Versions:
    WordPress: 6.6.2
    WordPress MS: No
    PHP: 7.4.3-4ubuntu2.23
    WP Mail SMTP: 4.1.1

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out
    Host: smtp.office365.com
    Port: 25
    SMTPSecure:
    string(0) ""
    SMTPAutoTLS:bool(true)
    SMTPAuth:bool(true)

    Server:
    OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
    Apache.mod_security: No

    Debug:
    Email Source: WP Mail SMTP Mailer: Other SMTP SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out

    SMTP Debug:
    2024-10-10 06:31:13 Connection: opening to smtp.office365.com:25, timeout=30, options=array()
    2024-10-10 06:31:43 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:25 (Connection timed out) [/var/www/html/wp-includes/PHPMailer/SMTP.php line 409]
    2024-10-10 06:31:43 SMTP ERROR: Failed to connect to server: Connection timed out (110)
    SMTP Error: Could not connect to SMTP host. Failed to connect to server
    Thread Starter Mustafa

    (@mustafakolkattawala)

    Versions:
    WordPress: 6.6.2
    WordPress MS: No
    PHP: 7.4.3-4ubuntu2.23
    WP Mail SMTP: 4.1.1

    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.1f 31 Mar 2020
    Apache.mod_security: No

    Debug:
    Email Source: WP Mail SMTP Mailer: Other SMTP SMTP Error: Could not authenticate.

    SMTP Debug:
    2024-10-10 08:08:13 Connection: opening to smtp.office365.com:587, timeout=30, options=array()
    2024-10-10 08:08:13 Connection: opened
    2024-10-10 08:08:13 SERVER -> CLIENT: 220 PN3PR01CA0100.outlook.office365.com Microsoft ESMTP MAIL Service ready at Thu, 10 Oct 2024 08:08:12 +0000 [08DCE882B670B602]
    2024-10-10 08:08:13 CLIENT -> SERVER: EHLO www.fmt52.com
    2024-10-10 08:08:13 SERVER -> CLIENT: 250-PN3PR01CA0100.outlook.office365.com Hello [3.110.231.242]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
    2024-10-10 08:08:13 CLIENT -> SERVER: STARTTLS
    2024-10-10 08:08:13 SERVER -> CLIENT: 220 2.0.0 SMTP server ready
    2024-10-10 08:08:13 CLIENT -> SERVER: EHLO www.fmt52.com
    2024-10-10 08:08:13 SERVER -> CLIENT: 250-PN3PR01CA0100.outlook.office365.com Hello [3.110.231.242]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8
    2024-10-10 08:08:13 CLIENT -> SERVER: AUTH LOGIN
    2024-10-10 08:08:13 SERVER -> CLIENT: 334 VXNlcm5hbWU6
    2024-10-10 08:08:13 CLIENT -> SERVER: [credentials hidden]
    2024-10-10 08:08:13 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
    2024-10-10 08:08:13 CLIENT -> SERVER: [credentials hidden]
    2024-10-10 08:08:18 SERVER -> CLIENT: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [PN3PR01CA0100.INDPRD01.PROD.OUTLOOK.COM 2024-10-10T08:08:18.757Z 08DCE882B670B602]
    2024-10-10 08:08:18 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. [PN3PR01CA0100.INDPRD01.PROD.OUTLOOK.COM 2024-10-10T08:08:18.757Z 08DCE882B670B602]
    SMTP Error: Could not authenticate.
    2024-10-10 08:08:18 CLIENT -> SERVER: QUIT
    2024-10-10 08:08:18 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel
    2024-10-10 08:08:18 Connection: closed
    SMTP Error: Could not authenticate.
    Thread Starter Mustafa

    (@mustafakolkattawala)

    Hello,

    I have tried what you send me but the same error is coming.

    Versions:
    WordPress: 6.6.2
    WordPress MS: No
    PHP: 7.4.3-4ubuntu2.23
    WP Mail SMTP: 4.1.1

    Params:
    Mailer: smtp
    Constants: No
    ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out
    Host: smtp.office365.com
    Port: 25
    SMTPSecure:
    string(0) ""
    SMTPAutoTLS:bool(true)
    SMTPAuth:bool(true)

    Server:
    OpenSSL: OpenSSL 1.1.1f 31 Mar 2020
    Apache.mod_security: No

    Debug:
    Email Source: WP Mail SMTP Mailer: Other SMTP SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out

    SMTP Debug:
    2024-10-10 08:46:21 Connection: opening to smtp.office365.com:25, timeout=30, options=array()
    2024-10-10 08:46:51 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:25 (Connection timed out) [/var/www/html/wp-includes/PHPMailer/SMTP.php line 409]
    2024-10-10 08:46:51 SMTP ERROR: Failed to connect to server: Connection timed out (110)
    SMTP Error: Could not connect to SMTP host. Failed to connect to server
    Plugin Support Victoria Sakal

    (@sakalvictoria)

    Hi, @mustafakolkattawala!

    Thanks for sharing the error log.

    The “SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 110 Additional SMTP info: Connection timed out” error in most cases appears when SMTP credentials are incorrect.

    Please, recheck them once again to be sure that everything is set up according to our guide here.

    Also, the “Other SMTP” mailer option does not use a dedicated API, which can lead to potential errors based on your website hosting settings. In cases where ongoing issues arise while using the “Other SMTP” mailer, we generally recommend switching to a transactional mailer option (it’s all mailers except the “Other SMTP” and “Default (none)” option).

    WP Mail SMTP has documentation on setting up each of the available mailers here.

    Kind regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.