[resolved] [closed] SMTP connect() failed (33 posts)

  1. Nathan Ingram
    Posted 1 year ago #

    Hi... I've triple verified that my login info is correct and tried a couple of different gmail addresses to be sure. I cannot get the plugin to connect.

    Strangely, I've had the same issue with the WP SMTP plugin. Same kind of connection error.

    Is there something at the server level that could be preventing this plugin from working?


  2. MarximusMG
    Posted 1 year ago #

    I just installed this plugin and am having the same issue. I've checked over and over again to make sure the SMTP details are correct, but getting the same message:

    SMTP connect() failed

    I'm using an email set up through nsMail (Network Solutions) hosted through AWS EC2.

  3. Nathan Ingram
    Posted 1 year ago #

    Turns out, for me, port 587 was blocked on my VPS. I had the host open it and everything works fine.

  4. MarximusMG
    Posted 1 year ago #

    Hmm... I just tried adding an inbound custom TCP rule for port 587 in my EC2 instance security group rules, but still no luck. Anyone else having this issue?

  5. MarximusMG
    Posted 1 year ago #

    I just tried changing encryption to "None", and it works. Is this a potential issue, not having it SSL encrypted?

  6. pshay92
    Posted 1 year ago #

    I am having this same issue using gmail. Triple checked the login information.

  7. Frank Gomez
    Posted 1 year ago #

    I tried changing encryption to none too but no joy. I tried many, many settings, all without success.

  8. andrezasv
    Posted 1 year ago #

    I have the same issue. Any solution?

  9. Frank Gomez
    Posted 1 year ago #

    What I did.
    Deleted the SMTP plugins.

    I created an email account (a forward) with the same domain for every websites contact / form / newsletter. That way the email comes from the domain and doesn't get blocked even using php mail function.

  10. bevels
    Posted 1 year ago #

    I'm getting the same error.

    In case my findings help solve the problem here's what I know.

    - I've tried all possible configurations within the plugin itself.
    - It's most likely NOT my server because I've used the plugin successfully with my hosted mail account (which uses the same port, if it makes any difference)
    - I've tried it with multiple gmail accounts, all have the same issue.
    - I enabled 'Less Secure Apps' in gmail in case contemporary gmail security wasn't allowing the plugin to connect.. no dice.

    Looking forward to someone smarter than me figuring it out!

    Note to person smarter than me.. please post your resolve if you find one.

  11. belindajohnstone
    Posted 1 year ago #

    Having same problem with Hotmail... anyone?

  12. andrezasv
    Posted 1 year ago #

    Yes, the emails go to spam folder in hotmails.

  13. betzy
    Posted 1 year ago #

    gmail say:

    Application/device sign-in attempt (prevented)

  14. Mezloh
    Posted 1 year ago #

    I cannot get this to work for nothing. Add in valid credentials and this is what i get. SMTP connect() failed. SMDH

  15. rewesh
    Posted 1 year ago #

    follow the steps in the link , you will get it solved

  16. max_Q
    Posted 11 months ago #

    I had to do this (from Google): "If you're still having problems, visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If necessary, enter the letters in the distorted picture." Then immediately initiate a connection.

    More info in this article.

    But first, I also had to "allow less secure apps to access your account". From Google: "Your mail app might not support the latest security standards. Learn how to allow less secure apps access to your account."

    Here's an article discussing it. Apparently, "less secure apps" are those that don't support OAuth2.0 for SMTP. It seems like only Google does.

    After all that, my website actually sent an email. It's not like landing on mars, but it's something.

  17. Mezloh
    Posted 11 months ago #

    In my case it was not a plugin issue at all or a settings issue.

    This is for everyone that hosts their sites on Bluehost, which is where my client's site was hosted.

    Up until this point my client was using domain email so everything was working like it was intended. did not need the smtp plugin.

    He then switched to Google Apps and used gmail for his mx exchange to take advantage of all the resources that integrate with it.

    We were still using his domain email address but it was not ending at Bluehost but rather redirected to Gmail so Bluehost Blacklisted his site.

    After further research into this, earlier this year Bluehost changed their Spam Settings and automatically blacklist all email that is not resolving to their email servers. So no email going through to gmail.

    Once I found this out I got on live chat with Bluehost and sure enough it was blacklisted. Once they whitelisted my client's domain the smtp plugin could connect again and all was happy again.

    It took 6 sessions on live chat (30 minute wait time every time) with them to finally convince them to look for this. They kept saying all your settings are correct there is no reason for this it just needs to propagate.

    The first time I got on chat before I found out about the automatic blacklist I made the "is this domain blacklisted" suggestion to their live chat support. But they told me it wasn't the issue. Many wasted hours but it works.

  18. plansman
    Posted 11 months ago #

    I got the same problem but tried everything with no luck.

  19. pushkar adhikari
    Posted 10 months ago #

    i am using Configure-SMTP plugin for sending a mail but its not working.

    when i am trying this to localhost its work fine for me.
    But when i comes to my live server it generate the error SMTP connect() failed.

    I tried every possible configuration but not working for me.
    plz help......

  20. Jason Hendriks
    Posted 8 months ago #

    @max_Q you inspired me to create a solution. If you're having trouble sending Gmail 'using plain passwords to authenticate' (i.e.. SMTPS with SSL or TLS), then you can either

    • ask Google to "allow less secure apps to access your account" or
    • actually use the authentication they want, which is OAuth 2.0

    I wrote a plugin to do just that Postman SMTP with OAuth for Gmail.

    My site emails were being swallowed by Google and I had no idea for months! There was no error. I didn't realize until I tried to use the 'forgot my password' link and found it no longer worked.

  21. wpecommerce
    Plugin Author

    Posted 8 months ago #

    If you are using Gmail and configuring SMTP for the first time you might get the "Application/device sign-in attempt (prevented)" message. You will need to login to your gmail account and unblock it. Otherwise, the plugin will not be able to send email.

  22. awtx
    Posted 7 months ago #

    See this post about blocked outgoing web server ports.
    WordPress post-6683898

    @MarximusMG - your EC2 instance is sending, not receiving email, so there is no need to open an incoming port. If you are using an SSL connection to send mail through nsMail, try using the correct port 465.

    @belindajohnstone and @andrezasv - your email is being delivered properly so don't blame the plugin. You need to fix your domain SPF record so Hotmail won't flag the email as spam. You can also whitelist the contact form FROM address so Hotmail/Yahoo/AOL etc won't automatically delete the messages or flag them as spam.

  23. andrethierry
    Posted 6 months ago #

    Wondering how these smtp plugins work with domain email addresses?

    website - http://www.andrethierry.com
    email using andre@andrethierry.com
    godaddy hosting.

    I keep getting failed error.
    Do I need to get my email whitelisted by godaddy?

    Any insight into this would be appreciated.

    Mostly I see gmail, yahoo, and hotmail help.


  24. awtx
    Posted 6 months ago #


    Godaddy has a closed hosting system.
    They do not permit you to send any email from the hosting server to email accounts that are not hosted by GoDaddy. All email sent from their hosting servers is forced to use mail(). You absolutely cannot send form or website admin email via SMTP.

    All SMTP traffic attempting to use Ports 25, 465 or 587 is automatically trapped by their proxy server. If the TO: address does not match a domain hosted at GoDaddy, the email is blocked. The sad thing is that their Tier 1 support people don't even understand this security feature or comprehend how it works.

    If the email for the website domain is hosted at GoDaddy you need to change the FROM address, for your contact form and the email address used in WordPress Settings, to a mailbox or forwarding alias using that same domain.

    If you want the form or admin email to be delivered to an email account that is not hosted by GoDaddy, setup an email forwarder using a domain hosted at GoDaddy. We have a .net version of a domain that only has forwarders setup to send mail to the .com mail hosted on another service.

    The final solution for flawless website email delivery is to make sure your GoDaddy hosted website is sending email through a GoDaddy hosted mailbox or forwarder.

  25. andrethierry
    Posted 6 months ago #

    Hi AWTX,

    Thank you very much for your response.
    I wanna make sure I understand.

    Are you saying to set up a .net domain as the exact same name as the .com domain?

    Would you be so kind to show me your examples? All info is APPRECIATED!

    I really need this to work for my website. I knew it was going to be some silly godaddy boundary.


  26. awtx
    Posted 6 months ago #

    Looking at your domain, you don't have to do anything.
    Your MX record is pointing to GoDaddy so your email is setup there.

    Just make sure your contact forms send TO your andrethierry.com email address. Then check the site owner email address in WordPress General Settings to make sure it has a andrethierry.com email address.

    Login to WordPress, click Settings on left side menu, click General.

    If you want WordPress alerts/notifications to do to a different email address that is not hosted at GoDaddy, setup a GoDaddy forwarder for it.

    To send from WordPress to andreexample@gmail.com you would create a forwarder andreexample@andrethierry.com in your GoDaddy account and add andreexample@gmail.com as the destination. Then in WordPress you would use andreexample@andrethierry.com.

  27. Jason Hendriks
    Posted 6 months ago #

    FYI to all who are interested, we solved @andrethierry's issue in two parts.

    1. setting the correct SMTP server (relay-hosting.secureserver.net on port 25 with STARTTLS) for GoDaddy-hosted email
    2. setting the correct SPF on the domain to prevent rejection at Gmail and Yahoo: "v=spf1 a mx include:secureserver.net ~all"
  28. awtx
    Posted 6 months ago #

    -- This is regarding GoDaddy hosting only. The Postman SMTP plugin is brilliant and the Easy WP SMTP plugin with work with the majority of hosting companies.

    Jason, NO, you didn't really fix anything. You are simply making it look like you did by duplicating what is happening automatically on the hosting server. Your plugin (or any SMTP plugin on a GoDaddy site) is not actually doing anything in this particular case.

    Using an SMTP plugin for GoDaddy WordPress hosting is a completely useless extra step. GoDaddy will automatically route all PHP mail() email through their proxy controlled relay servers no matter what you attempt to do with scripts or plugins. Email from a GoDaddy hosted site can only be delivered to GoDaddy hosted forwarders or email accounts.

    Even in this particular case where it looks like the plugin is doing the job, the efforts of the plugin are completely ignored on the server.

    Per GoDaddy server admin staff; their antispam measures are hardcoded into the servers so that wp_mail() will always use PHP mail() and PHP mail() will always send mail through their relay servers. Any email is automatically whitelisted when sent from any of their website hosting accounts to GoDaddy hosted email accounts. Don't ignore the SPF record though, that should always be setup to ensure normal email delivery.

    No need to argue, just try using the plugin to send email directly to a Gmail account or any mailbox not hosted by GoDaddy. It will fail.

    You absolutely cannot get around GoDaddy's antispam security measures. You don't need to install anything if, like @andrethierry, your website & email are hosted by GoDaddy. Just make sure your WordPress site owner email address and your contact forms send mail TO a GoDaddy hosted forwarder or email account. Andre was just working too hard (just like many of us have) to solve a expected problem when GoDaddy already had a super simple solution hardcoded into the server.

  29. andrethierry
    Posted 6 months ago #

    awtx - emails are moving along now. purchasers are getting emails.

    Question --- what is--- a GoDaddy hosted forwarder or email account?
    Is this a separate domain I have to purchase?
    Please provide examples(you may have already done this.)
    I'd really like to see what your set up looks like.



  30. awtx
    Posted 6 months ago #

    "GoDaddy hosted forwarder or email account" means exactly that, the email is hosted at GoDaddy.

    Explore your GoDaddy Products tab so you are familiar with your account.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.