How to make WordPress droplet send emails?

August 4, 2019 242 views
WordPress Ubuntu 18.04

My WordPress droplet on Ubuntu 18.04 cannot send emails via wp_mail() function.

I want my WordPress droplet to send emails via wp_mail() function, not an external SMTP plugin.

How to I fix this problem?

1 Answer

Hello,

Could you please let me know if you’re receiving any error messages? Can you please post the output of this command? It will check if your Droplet is able to communicate over the ports required to send emails externally:

nc -vz smtp.gmail.com 25

Some accounts have SMTP blocked default due to abuse and the output will help us to see if you’re having this issue.

Looking forward to your reply.

  • Connection to smtp.gmail.com 25 port [tcp/smtp] succeeded!

    • Thanks for confirming this.

      Do you receive any error messages? How exactly you’re testing the mail functionality?

      Looking forward to your reply.

      Alex

      • No error messages.

        I test the mail functionality using the following URL in WordPress Admin:

        wp-admin/tools.php?page=health-check&tab=tools

        It says:

        “We have just sent an e-mail using wp_mail() and it seems to work. Please check your inbox and spam folder to see if you received it.”

        But I never receive any emails at all.

Have another answer? Share your knowledge.