How to setup phpmailer, smtp, and digitalocean (ubuntu 18.04)

August 20, 2019 818 views
PHP Ubuntu 18.04

Hello world,

I have developed a web app and I need to send emails from app to users for account confirmation, password reset, info, etc.

The app is written in PHP and uses phpmailer to send emails.

My question is, how can I setup smtp in digital ocean? how can I define my system’s email address (e.g.

Any kind of hint would be very appreciated.


1 Answer

You can install something like Postfix.

You can follow the steps here on how to do that:

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.