Wordpress Won't Send Contact Form Emails

Posted January 19, 2016 29.2k views


I’ve only just noticed that a few of my Wordpress sites won’t send the emails from the Contact form. I am using a plugin called Contact Form 7.

I presume it is because Digital Ocean don’t install a SMTP server in the Wordpress 1 click installation.

Does anyone know how i could get these to work. Please bare in mind i am far from a server engineer :-) Thanks in advance for your help.

  • not a server admin/pro – I’m a front end boy. I’m not understanding @kamaln7’s instruction unfortunately. I noticed my contact form 7 (the plugin) wasn’t able to send emails. I’ve exhausted myself with research and it looks like the server might be the issue. How can I get some help? I went ahead and typed “sudo service postfix restart” in the console, should this do it? How long does this usually take to function. Thanks!

  • Hi @fit, sorry to hear that. What’s the output of nc -z 25? If port 25 is blocked, postfix or any other mail server won’t be able to connect to other mail servers to send email, so you need to make sure that port 25 isn’t blocked on your Droplet.

  • are you talking about the digital ocean droplet console? Nothing comes up, screenshot:

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

Bloody DigitalOcean not say and and Bloody DigitalOcean interface not NOTICE that sendmail is always blocked, and you need to get permission with support agent. ;-)


Thank you for your reply.

Postfix was not installed, this is output when I installed it:

The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.

Is there something additional that i need to select on the one click install?

  • That’s weird, how old is your Droplet? Is it possible that you might have accidentally uninstalled it?

    Simply installing Postfix should be enough. I’d recommend, though, configuring it to listen on the local network interface only (assuming you’re not using your Droplet as a mail server on the receiving end). To do that, open /etc/postfix/ in your favorite editor:

    sudo nano /etc/postfix/

    Then, find the line that says inet_interfaces = all and replace all with loopback-only. Save the file and restart Postfix:

    sudo service postfix restart

All Wordpress one-click droplets have Postfix, a mail server/MTA, installed. You can verify that it’s running by looking at the output of:

sudo ps wwaux | grep postfix | grep -v grep

Try running the following command on your droplet:

nc -z 25

If it does not output the following, it’s possible that SMTP is blocked on your droplet. In that case, please file a support ticket and the support team will take care of it. Thanks!

Connection to port 25 [tcp/smtp] succeeded!


The SMTP ports are blocked to avoid spam according to DO,
the solution I found at least in wordpress is to create a free account ZOHOMAIL and then do all the DNS records configuration,

then I installed the WP SMTP plugin in Wordpress

I entered the SMTP configuration for Zoho Mail - SSL /es-xl/mail/help/zoho-smtp.html

, I ran a test and solved!

by Mitchell Anicas
One way to send and receive email through your own custom domain is to use a third-party mail service, such as Zoho or Google Apps. The main benefit of using a third-party mail service, as opposed to managing your own mail server, is that you can avoid performing the ongoing maintenance that running a mail server entails. This tutorial will show you how to set up Zoho Mail with your custom domain that is managed by DigitalOcean's Domain Name Servers.