Member-only story

How to Send E-Mails In Ubuntu Server Via NodeJS Using Postfix

Maneesha Indrachapa
6 min readMay 10, 2020

--

Hi all,

To send an email to the Ubuntu server (Google Cloud Platform) via node-js first you need to set up a node project. The easiest way is to set the node project in your local machine and then put all the files into GitHub and then clone all the files to your server using git clone

To create a node-js project first need to install node-js and after installing node-js need to check that node-js path is included in the environment variables. To check that go to properties of and click System Protection then advanced then Environment Variables the select path.

To check the node and node package manager (npm) is working correctly go to your command prompt and type node -v , npm -v

if you see the version that installed the node and npm working properly.

create a node project

To create a node js project go to the folder where you need to create the project via command prompt and npm init it will create a package.json file and send emails in node you need to install some dependencies.

The first one is nodemailer , to install runnpm install nodemailer in command prompt.

--

--

Maneesha Indrachapa
Maneesha Indrachapa

Written by Maneesha Indrachapa

If you can dream it, you can do it.

No responses yet