Wordpress site not sending out emails

Hello all,

I'm a newbie, so bear with me. :)

I've set up a Wordpress site using this very helpful guide -

https://www.linode.com/docs/websites/cm … -wordpress">https://www.linode.com/docs/websites/cms/how-to-install-and-configure-wordpress

I have also installed a Contact Form 7 plugin which I use to create "contact me" forms. However, the form submissions fail to send out emails to my designated inbox (the error message was "Failed to send your message. Please try later or contact the administrator by another method.")

Did I miss anything? I suspect that it may have to do with setting up mail servers. I am, however, using an external service (fastmail) for that domain.

I would appreciate any help, thank you very much!


3 Replies

You need a Mail Transfer Agent (MTA), more commonly called a mailserver, to handle your mail. I suggest installing Postfix as it is reasonably straightforward and secure. You would want to put the following settings in /etc/postfix/main.cf:

myhostname = hostname.example.com
myorigin = $mydomain
inet_interfaces = loopback-only
mydestination =

The first line sets your hostname (customize for your actual case). The second sets addresses for mail coming from your webserver to be something@example.com. The third line tells Postfix not to listen for external network connections (i.e., it cannot receive mail from outside). The fourth specifies that there are no local addresses - that is, no mail has this machine as its final destination.

This should pretty much be it. If you run into trouble with Fastmail not accepting messages, you may want to look into the guide for using external SMTP servers.

I agree, you should go for a external plugin and you will get through.

If you're expecting a low volume of mail, SparkPost offers free SMTP service. I run a Discourse for Linodians on a Linode. Rather than doing my own mail, which sucks (IMO), I use SparkPost and it's working very well so far.

Another option might be to not use that WordPress plugin and instead use a FormSpree form which is simple HTML that can then send you an email, also for free.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct