Wordpress cannot send smtp emails

Issues related to configuring your network
Post Reply
webanditstudio
Posts: 9
Joined: 2019/08/15 12:07:51

Wordpress cannot send smtp emails

Post by webanditstudio » 2019/08/15 12:18:56

I have CentOS 7 installed on a server tower connected to a LAN behind the standard firewall in the vdsl router (BT Business Hub 5).
I am using apache as the web server and Wordpress is working pretty much as I would expect, purely as an internal Intranet.
However, wordpress cannot send emails and I can't figure out why.

I am using the WPmail plugin that allows me to be precise about what email servers Wordpress is using.

Wordpress cannot send emails from its built in smtp service and I have entered my own mail server settings into WPmail to try to send mail through my own external mail server. WPmail has its own built in test email and this always fails with an error that it could not connect to the mail server. This happens however I configure the mail server settings.

I can successfully ping the mail server from a bash prompt so I guess the firewall is allowing an actual connection but how can I tell if it is blocking smtp or blocking any port access (I have tried using smtp ports 25, 465 and 587)?
Any help would me much appreciated please.

User avatar
TrevorH
Forum Moderator
Posts: 27164
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wordpress cannot send smtp emails

Post by TrevorH » 2019/08/15 18:50:06

However, wordpress cannot send emails and I can't figure out why.
Selinux stops httpd from sending email by default unless it's told not to using setsebool -P httpd_can_sendmail 1
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

webanditstudio
Posts: 9
Joined: 2019/08/15 12:07:51

Re: Wordpress cannot send smtp emails

Post by webanditstudio » 2019/08/15 19:13:08

Wow, thanks so much, TrevorH. Worked straight away.
I've spent a full trying to figure that out.
Much appreciated.

Post Reply

Return to “CentOS 7 - Networking Support”