Wordpress with "contact form 7" plugin not sending emails

March 18, 2019 1.2k views
Ubuntu 18.04 WordPress

I can’t seem to send emails from contact forms 7 on my WP installation.

What’s the solution?

I have a droplet from the marketplace with WP running on Ubuntu 18.04

1 Answer

Greetings!

Great topic. Sending email is not as easy as it used to be. In some environments, certain things are pre-configured for you to facilitate this (like a shared hosting environment where hostname/PTR are already configured). I highly recommend that you run far away from the idea of sending without an SMTP provider, because I have a unique amount of experience with running mail servers and I do not wish it on anyone. You just want to send email, not make a career out of it. This is increasingly difficult due to spam reduction efforts at all major email providers. Something like this would potentially be a great solution:

https://wordpress.org/plugins/gmail-smtp/

If you do want to run your own mail server for sending email, you will at bare minimum need this:

  1. Your droplet must be renamed to a FQDN (ex. host.example.com). This sets a PTR record.
  2. Your droplet’s hostname needs to be reconfigured to match that FQDN. https://linuxconfig.org/how-to-change-hostname-on-ubuntu-18-04-bionic-beaver-linux
  3. You must have a DNS A record that matches that IP to the FQDN set (this is for forward confirmed reverse DNS.
  4. You must at least have an SPF record for any reasonable quality of delivery. https://blog.returnpath.com/how-to-build-your-spf-record-in-5-simple-steps/

Jarland

Have another answer? Share your knowledge.