• Hello there

    When I tried to send a test mail it show mi this message . How I can solve this?

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to smtp.gmail.com:587 (Connection refused)
    SMTP ERROR: Failed to connect to server: Connection refused (111)
    SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

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

    (@naa986)

    Hi, Can you please contact your host to make sure that port 587 is not blocked? Please also copy and paste the content of the “Server Info” tab so I can take a look.

    If you are using digitalocean then you need to disable IPv6 because they do not allow outgoing SMTP via IPv6

    I am having the same problem, with a site hosted at HostMonster. I have tried both the TLS and SSL settings, and also port 25, as per the suggestion of this article (https://wphowto.net/gmail-smtp-plugin-for-wordpress-1341), but in every case it takes forever to get a response when I try to send the test email, and when it finally does come back, it has the “Error notice: stream_socket_client():” error.

    Can you help?

    Here’s the server info:
    OS: Linux host178.hostmonster.com 3.12.65-20161020.132.ELK6.x86_64 #1 SMP Thu Oct 20 23:36:20 CDT 2016 x86_64
    PHP version: 5.6.29
    WordPress version: 4.7.2
    WordPress multisite: No
    openssl: Available
    allow_url_fopen: Enabled
    stream_socket_client: Available
    fsockopen: Available
    cURL: Available
    cURL Version: 7.24.0, OpenSSL/1.0.0

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I am not getting the test mail. it said error’ is closed to new replies.