WordPress SMTP DigitalOcean Issue

December 22, 2014 5k views


Has anyone had an issue with using WP Mail SMTP on digitalocean servers?

I created a contact form plugin for my wordpress website.

I am using the wpmail to send email.

I am using WP MAIL SMTP plugin. So that wp_mail function uses SMTP instead of the standard mail().

local: ( Sent
live: ( ) Failed

Was told blocks digitaloceans IP thats fine.

local: ( Sent
live: ( Failed

Error message from WP MAIL SMTP plugin:
string(35) "SMTP Error: Could not authenticate."
string(43) "SMTP Error: Could not connect to SMTP host."
string(30) "SMTP Error: data not accepted."


local: ( Sent
Live: ( Failed

Same Error as gmail.


I've gone onto gmail and EVEN mandrill and it's not working live but works locally. So i am unsure what is the difference on my local ubuntu 14.04 machine when compared to my live droplet ubuntu 14.04 machine when i set them up the same way using the guides found on digital ocean.

  1. Anyone else had a problem with this?

  2. Does someone know of an alternative to WP SMTP Plugin so i can rule out or determine whether the plugin has an issue when used from my droplet.

  3. Could port 587 or 465 be blocked on my droplet? Could someone please tell me how i can check and then how i can open the ports.

1 comment
  • I have the same exact problem. On my localhost server SMTP and phpMail works - I can send email in many different ways. But none work in my droplet.
    I have run :

    nc -vz 25

    and the connection succeeds (it also succeeds in port 465) so I am assuming that it's not SMTP being blocked.
    How can I determine if its an issue with my droplet or with wordpress. Does any one have any ideas on good methods for debugging this?

1 Answer

It's possible that SMTP is blocked on your droplet. Run the following command to check if you can connect to port 25 on a remote server:

nc -vz 25

If that does not succeed, please open a support ticket so the team can take a look and help you out. Thanks!

  • That is right!

    To curb a recent increase in abuse and SPAM, we have an initial SMTP block on new accounts created in certain contexts.
    To remove that block we'd like to do some manual account verification.
    Please let us know the following:
    Your Name 
    Phone Number 
    The reason you are requesting the removal of the SMTP block
Have another answer? Share your knowledge.