Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

denali-mailer

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

denali-mailer

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

Denali Mailer

NPM version Build Status

An awesome addon built on the Denali framework.

Usage

Install within your app:

npm install --save denali-mailer

Create a mailer you'd like to use:

// app/mailers/welcome/mailer.js
import { Mailer } from 'denali-mailer';

export default WelcomeMailer extends Mailer {
  from = 'myemail@something.com';

  to(data) {
    return data.email;
  }
}

And define your templates in app/mailers/welcome/tempalte.{html,txt} which get access to the data via ejs.

Use in your action via this.service('mailer'):

import ApplicationAction from './application';

export default class IndexAction extends ApplicationAction {

  serializer = false;

  respond() {
    let mailer = this.service('mailer');
    let data = { email: 'hello@user.com' };
    
    mailer.send('welcome', data);
    
    return { message: 'Welcome to Denali!' };
  }

}

Developing

  1. Clone the repo down
  2. npm install
  3. denali server
  4. Hit localhost:3000

Tests

$ denali test

Keywords

FAQs

Package last updated on 09 Jul 2017

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc