• Resolved cambriawebmaster

    (@cambriawebmaster)


    Hi There

    What it is I have gravity forms on my website where people can send enquiries from.

    I also have the WP Mail SMTP plugin where I have all my credentials setup and these should go to Gmail accounts. I currently have:
    SMTP Host: smtp.gmail.com
    SMTP Port: 465

    (I have also tried it in TLS)

    I am also using SSL and we have our own server which is maintained by our IT department. This has all been checked for any other problems that can cause this but they tested it through powershell and I received a test email fine.

    If I try and send a test email via this plugin I then receive the below errors:

    The result was:
    bool(false)
    The full debugging output is shown below:
    PHPMailer Object
    (
    [Version] => 5.2.22
    [Priority] =>
    [CharSet] => UTF-8
    [ContentType] => text/plain
    [Encoding] => 7bit
    [ErrorInfo] => SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    [From] => [email protected]
    [FromName] => Coleg Cambria
    [Sender] =>
    [ReturnPath] =>
    [Subject] => WP Mail SMTP: Test mail to [email protected]
    [Body] => This is a test email generated by the WP Mail SMTP WordPress plugin.
    [AltBody] =>
    [Ical] =>
    [MIMEBody:protected] => This is a test email generated by the WP Mail SMTP WordPress plugin.

    [MIMEHeader:protected] => Date: Thu, 23 Nov 2017 12:15:29 +0000
    To: [email protected]
    From: Coleg Cambria
    Subject: WP Mail SMTP: Test mail to [email protected]
    Message-ID: <[email protected]>
    X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8

    [mailHeader:protected] =>
    [WordWrap] => 0
    [Mailer] => smtp
    [Sendmail] => /usr/sbin/sendmail
    [UseSendmailOptions] => 1
    [PluginDir] =>
    [ConfirmReadingTo] =>
    [Hostname] =>
    [MessageID] =>
    [MessageDate] => Thu, 23 Nov 2017 12:15:29 +0000
    [Host] => smtp.gmail.com
    [Port] => 465
    [Helo] =>
    [SMTPSecure] => ssl
    [SMTPAutoTLS] => 1
    [SMTPAuth] => 1
    [SMTPOptions] => Array
    (
    )

    [Username] => [email protected]
    [Password] => aqUXUjgEcP^Xr$90
    [AuthType] =>
    [Realm] =>
    [Workstation] =>
    [Timeout] => 300
    [SMTPDebug] => 0
    [Debugoutput] => echo
    [SMTPKeepAlive] =>
    [SingleTo] =>
    [SingleToArray] => Array
    (
    )

    [do_verp] =>
    [AllowEmpty] =>
    [LE] =>

    [DKIM_selector] =>
    [DKIM_identity] =>
    [DKIM_passphrase] =>
    [DKIM_domain] =>
    [DKIM_private] =>
    [DKIM_private_string] =>
    [action_function] =>
    [XMailer] =>
    [smtp:protected] => SMTP Object
    (
    [Version] => 5.2.22
    [SMTP_PORT] => 25
    [CRLF] =>

    [do_debug] => 0
    [Debugoutput] => echo
    [do_verp] =>
    [Timeout] => 300
    [Timelimit] => 300
    [smtp_transaction_id_patterns:protected] => Array
    (
    [exim] => /[0-9]{3} OK id=(.*)/
    [sendmail] => /[0-9]{3} 2.0.0 (.*) Message/
    [postfix] => /[0-9]{3} 2.0.0 Ok: queued as (.*)/
    )

    [smtp_conn:protected] =>
    [error:protected] => Array
    (
    [error] =>
    [detail] =>
    [smtp_code] =>
    [smtp_code_ex] =>
    )

    [helo_rply:protected] =>
    [server_caps:protected] =>
    [last_reply:protected] =>
    )

    [to:protected] => Array
    (
    [0] => Array
    (
    [0] => [email protected]
    [1] =>
    )

    )

    [cc:protected] => Array
    (
    )

    [bcc:protected] => Array
    (
    )

    [ReplyTo:protected] => Array
    (
    )

    [all_recipients:protected] => Array
    (
    [[email protected]] => 1
    )

    [RecipientsQueue:protected] => Array
    (
    )

    [ReplyToQueue:protected] => Array
    (
    )

    [attachment:protected] => Array
    (
    )

    [CustomHeader:protected] => Array
    (
    )

    [lastMessageID:protected] => <[email protected]>
    [message_type:protected] => plain
    [boundary:protected] => Array
    (
    [1] => b1_26d4900f25f1606c1cba7064e7428553
    [2] => b2_26d4900f25f1606c1cba7064e7428553
    [3] => b3_26d4900f25f1606c1cba7064e7428553
    )

    [language:protected] => Array
    (
    [authenticate] => SMTP Error: Could not authenticate.
    [connect_host] => SMTP Error: Could not connect to SMTP host.
    [data_not_accepted] => SMTP Error: data not accepted.
    [empty_message] => Message body empty
    [encoding] => Unknown encoding:
    [execute] => Could not execute:
    [file_access] => Could not access file:
    [file_open] => File Error: Could not open file:
    [from_failed] => The following From address failed:
    [instantiate] => Could not instantiate mail function.
    [invalid_address] => Invalid address:
    [mailer_not_supported] => mailer is not supported.
    [provide_address] => You must provide at least one recipient email address.
    [recipients_failed] => SMTP Error: The following recipients failed:
    [signing] => Signing Error:
    [smtp_connect_failed] => SMTP connect() failed.
    [smtp_error] => SMTP server error:
    [variable_set] => Cannot set or reset variable:
    [extension_missing] => Extension missing:
    )

    [error_count:protected] => 2
    [sign_cert_file:protected] =>
    [sign_key_file:protected] =>
    [sign_extracerts_file:protected] =>
    [sign_key_pass:protected] =>
    [exceptions:protected] => 1
    [uniqueid:protected] => 26d4900f25f1606c1cba7064e7428553
    }

    Please help?

    Thanks

    Rhys

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Pramathesh

    (@paramathesh)

    Even I’m facing the same issue. Did you have it resolved yet?

    Plugin Author Slava Abakumov

    (@slaffik)

    There are so many possible reasons for this error, and all of them are not related to the plugin itself. They are regarding hosting restrictions (closed ports/protocols, misconfiguration).

    I recommend reading this article: https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    It has some troubleshooting and bits of advice.

    Thread Starter cambriawebmaster

    (@cambriawebmaster)

    Hi Slava

    Thank you for the reply and I have checked through most of the points mentioned in that aritcle as I can do a powershell command on the 587 port TLS and it works.

    Its not a firewall or a permissions issue. I think it could be a PHP version problem but our website has to use version 7 or above to work. Also I noticed it works now and again too so one afternoon it will work and emails will get sent to myself and then the next day it fails :-(.

    Any ideas as Im really stuck here. The only other possibility is that we have a SSL certificate on the server so not sure if that would cause issues.

    Thanks

    Plugin Author Slava Abakumov

    (@slaffik)

    Thresholds, or other limits (like emails per day or per hour). Perhaps, someone spamming from you.

    Thread Starter cambriawebmaster

    (@cambriawebmaster)

    After speaking to our IT administrators they have sent me a log of mail activity and it looks like it was sending submissions fine at 5am but then I have checked today and done a TEST email and got this error:

    ool(false)
    The full debugging output is shown below:
    PHPMailer Object
    (
    [Version] => 5.2.22
    [Priority] =>
    [CharSet] => UTF-8
    [ContentType] => text/plain
    [Encoding] => 7bit
    [ErrorInfo] => SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
    [From] => [email protected]
    [FromName] => Coleg Cambria
    [Sender] =>
    [ReturnPath] =>
    [Subject] => WP Mail SMTP: Test mail to [email protected]
    [Body] => This is a test email generated by the WP Mail SMTP WordPress plugin.
    [AltBody] =>
    [Ical] =>
    [MIMEBody:protected] => This is a test email generated by the WP Mail SMTP WordPress plugin.

    Cambria: I fixed my Gmail problem by enabling “access for less secure apps” in my Google account. Never had to do this before the plugin was updated. Hope this helps someone else.

    Use https://myaccount.google.com/lesssecureapps for “access for less secure apps” turn on will work
    If still not working use your server SMTP setting with same domain name

    eg:
    SMTP Host: mail.example.com
    SMTP Port: 465
    STMP USER: [email protected]
    STMP USER: your_password

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘SMTP connect() failed’ is closed to new replies.