How to Activate email funtion

August 21, 2019 171 views
Ubuntu OpenLiteSpeed WordPress 1-Click

My site is hosted on Digital Ocen with Wordpress. Now i want to activate mail function for my site because i am unable to receive contact form email. Please guide me how to activate it.

3 Answers
[deleted]
[deleted]

Hello,

By default Wordpress uses plain PHP mail which is not very reliable. It is better to use SMTP. I could sugges using a plugin like Easy WP SMTP. This would allow to easily integrate SMTP functionality to your site.

Then you could either setup an SMTP service on your droplet, to set that up you could follow the steps here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04

Or you could use an external SMTP provider like Gmail. This would increase the delivery rate of your emails a lot.

If for any reason this is still not working, make sure to allow outgoing SMTP traffic:

sudo ufw allow 25
sudo ufw allow 465
sudo ufw allow 587
sudo ufw reload 

If you are still not receiving your emails even after that, you could test your outgoing connectivity on port 25 with this command here:

telnet smtp.gmail.com 25

If you are getting connection timeout, even after allowing the traffic via your firewall, then you could contact DO support team who will be able to guide you through getting mail functionality enabled on your Droplet and account!

https://www.digitalocean.com/company/contact/#support

Hope that this helps!
Regards,
Bobby

by Justin Ellingwood
Postfix is a popular open-source Mail Transfer Agent (MTA) that can be used to route and deliver email on a Linux system. It is estimated that around 25% of public mail servers on the internet run Postfix. In this guide, we'll teach you how to get up and running quickly...
Have another answer? Share your knowledge.