In this Tutorial, I am Going show you the Method to Send Pepipost Email Using Nodemailer via Node.js.Previously We saw the Methods to send Pepipost Emails via PHP cURL, Guzzle & bash.

Steps to Send Emails from Nodemailer using Pepipost

(PS: your system/Server Must having Node.js Latest & Stable Version)

  • Clone the Pepiemail Git respo
git clone https://github.com/mskian/pepiemail.git
cd pepiemail
npm install

  • modify sendmail.js - Authorize your Pepipost SMPT Account & Create Email
  • Find this Below line on sendmail.js & Add your Pepipost SMPT Login (For More Info visit your Pepipost Account setting dashboard)
// Account Authorization
let transporter = nodemailer.createTransport({
    host: 'smtp.pepipost.com',
    port: 587,
    secure: false,
    auth: {
        user: 'USERNAME', // Pepipost login Username
        pass: 'PASSWORD' // Pepipost Account Password
    }
});

  • Next Find this Line & Customize your Email
// Email Functions
let mailOptions = {
    from: '"Santhosh veer 👻" <[email protected]>', // Sender address
    to: '[email protected]', // List of receivers
    subject: 'Hello World ✔', // Subject line
    replyTo: '[email protected]', //  Reply-to Email
    //text: 'Hello world', // plain text
    html: '<b><u>Hello World Email</u></b>' // HTML Mail
};

  • Run the Script
node sendmail.js

  • Sample Console log Output on Terminal/CMD
Message <[email protected]> sent: 250 2.0.0
Ok: queued as XXXXXXXXX