Member-only story
How to Send E-Mails In Ubuntu Server Via NodeJS Using Postfix
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.
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.