Skip to content

iamchathu/nodemailer-pepipost-transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pepipost transport module for Nodemailer

npm Twitter

Applies for Nodemailer v1+ and not for v0.x where transports are built-in. Used Pepipost Nodejs SDK

Usage

Install with npm

npm install nodemailer-pepipost-transport

Require to your script

var nodemailer = require('nodemailer');
var pepipostTransport = require('nodemailer-pepipost-transport');

Create a Nodemailer transport object

var transporter = nodemailer.createTransport(pepipostTransport(options))

Where

  • options defines authentication
    • api_key - yoursecretkey of Pepipost.

Examples

Example 1. Use Pepipost API key to set up the sender

const transporter = nodemailer.createTransport(pepipostTransport ({
    auth: {
        api_key: 'secretkey'
    }
}));

Send mail example

const mail = {
    from: 'Name <from@your.domain>',
    to: ['to@client.domain'],
    subject: 'Test Emailer',
    html: '<p> hi, this is a test email sent via Pepipost JSON API.</p>',
};
transporter.sendMail(mail, function(err, info) {
    if (err) {
        console.log(err);
    }
        console.log(info);
});

License

MIT

About

📧 Pepipost transport for Nodemailer [Experimental]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published