WordPress email not sending Fixed

Hi Guys, Today I will show you on how to fixed this bug that most of the WordPress user encounter and this bug is really hard to fixed it takes me almost half a day before i fixed this bug.

Note: this fixed is for ubuntu user and on my case I’m using Digital ocean droplet

so let’s start

1. Make sure you have an Mail Transfer Agent on your droplet. if you don’t have , You will need to install an MTA (Mail Transfer Agent) on your droplet in order to route mail for PHP. You can do this simply by installing postfix or sendmail on your droplet.

to do this login in your console or login using putty in my case on windows then run this command to install the Mail Transfer Agent

sudo apt-get install sendmail

2. after installing you need to run this command and answer Yes to all

sudo sendmailconfig

3.  then run this command after setting the config to restart the service

service apache2 restart

4. then run command “reboot” to make sure every settings is reloaded



to test run this command , if this run successfully meaning you can now send email

telnet localhost 25

To Send test email you can install this plugin which send test email


if the email that  you send didn’t received by your test email, you just need to wait for awhile, if you didn’t received your mail after more than 2 minutes there’s a problem to check this problem you need to login again on your console or using putty.

run this command

nano /etc/hosts

after running this command you will see some text something like this       localhost.localdomain  localhost  [yourdomainname]

if you see something similar to this but not the same format fixed that by copying this format and your good to go. save it then repeat the process above from number 2 to 4. then test it again using our test above. on my case it works and i can send email now using my WordPress.

I Hope this Helps you Guys!

Thank you for reading and Happy Blogging!


for questions or feedback or comments just email us at gigadrillgames@gmail.com or you can comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.