• Hi, I’m currently having an issue setting up my SMTP settings for a client. Here’s the error I’m getting:

    Versions:
    WordPress: 4.9.2
    WordPress MS: No
    PHP: 7.0.24
    WP Mail SMTP: 1.2.3

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

    Server:
    OpenSSL: Yes
    SMTP Debug:
    2018-01-24 21:04:19 Connection: opening to 142.165.212.58:25, timeout=300, options=array (
    )
    2018-01-24 21:04:20 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to 142.165.212.58:25 (Connection refused)
    2018-01-24 21:04:20 SMTP ERROR: Failed to connect to server: Connection refused (111)
    2018-01-24 21:04:20 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    I’ve double-checked with them, and all of my settings. eg host, port, username and password are correct. Is somebody could help me out, I’d be very appreciative. Thank you.

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

    (@slaffik)

    SMTPSecure should not be an empty string (should be ssl or tls or none). With that value, your username/password is not even used.

    Remove all code snippets that are related to the plugin filters, also make sure that no other SMTP-related plugin activated on a site. After that – try again.

    Thread Starter jebrunquist

    (@jebrunquist)

    I’m sorry, I’m not following. I installed the plugin, inserted my SMTP settings and ran the test email. I even disabled/unactivated all of my plugins and received the same results.

    I’ve installed a template on my site. I imagine the code snippets you’re referring to would be template related? More saying that I haven’t put any code snippets in relating to the plugin filters, but my installed template would definitely have other snippets in it. Would the template be the issue?

    Thread Starter jebrunquist

    (@jebrunquist)

    Just for an update, I added this to functions.php in the theme to ensure SMTP secure was set to none:

    add_action( ‘phpmailer_init’, ‘my_phpmailer_init’ );
    function my_phpmailer_init( PHPMailer $phpmailer ) {
    $phpmailer->SMTPSecure = ‘none’;
    }

    I get the same results with “none” selected for SMTPSecure:

    Versions:
    WordPress: 4.9.2
    WordPress MS: No
    PHP: 7.0.24
    WP Mail SMTP: 1.2.3

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

    Server:
    OpenSSL: Yes
    SMTP Debug:
    2018-01-28 23:23:58 Connection: opening to 142.165.212.58:25, timeout=300, options=array (
    )
    2018-01-28 23:23:59 Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to 142.165.212.58:25 (Connection refused)
    2018-01-28 23:23:59 SMTP ERROR: Failed to connect to server: Connection refused (111)
    2018-01-28 23:23:59 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

    Still stumped as to why its not working.

    Plugin Author Slava Abakumov

    (@slaffik)

    Ok, I reviewed SMTP server on that IP address from your HOST option.

    Credentials should be set, Auth should be enabled, SMTPSecure should be set to empty , like it was previously in your initial post, SMTPAutoTLS should be off.

    With all that everything should be working, but it’s not. From plugin side I don’t see issues, you seems configured the plugin correctly.

    Try to use the host abcmail.abccanada.ca instead of an IP address, as this IP resolved to this domain name.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“There was a problem while sending a test email”’ is closed to new replies.