Socket
Book a DemoInstallSign in
Socket

nodemailer-pug-engine

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer-pug-engine

A nodemailer plugin for pug templates

2.0.1
latest
Source
npmnpm
Version published
Weekly downloads
165
-22.17%
Maintainers
1
Weekly downloads
 
Created
Source

Nodemailer-pug-engine

Install

npm install nodemailer-pug-engine

Usage

// typescript
import { pugEngine } from "nodemailer-pug-engine";

// javascript
const { pugEngine } = require("nodemailer-pug-engine");



const mailer = createTransport(...)

mailer.use('compile', pugEngine({
    templateDir: __dirname + '/templates',
    pretty: true
}));

mailer.sendMail({
    to: '..',
    template: 'test',   // defines the template to compile for the email
    ctx: {
        // this is available in the template
    }
});

Options

pugEngine

templateDir {string} - Path to templates directory

pretty {boolean} optional - Pretty print html (defaults to false)

sendMail Options

template {string} optional - defines the template relative to the pugEngine templateDir

ctx {object} optional - this is the available context in the pug template

Keywords

nodemailer

FAQs

Package last updated on 31 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.