New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

feathers-mailer

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-mailer

Feathers mailer service

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
698
decreased by-79.13%
Maintainers
3
Weekly downloads
 
Created
Source

feathers-mailer

Build Status

Feathers mailer service using nodemailer

Installation

npm install feathers-mailer --save

If using a transport plugin, install the respective module.

API

import Mailer from 'feathers-mailer'

mailer = Mailer(transport, defaults)

  • transport can be either SMTP options or a transport plugin with associated options.
  • defaults is an object that defines default values for mail options.

mailer.create(body, params)

mailer.create is a thin wrapper for transporter.sendMail, accepting body and returning err and info.

See here for possible fields of body.

Example

import Mailer from 'feathers-mailer'
import mandrill from 'nodemailer-mandrill-transport'

// Register the service, see below for an example
app.use('/mailer', Mailer(mandrill({
  auth: {
    apiKey: process.env.MANDRILL_API_KEY
  }
})));

// Use the service
var email = {
   from: 'FROM_EMAIL',
   to: 'TO_EMAIL',
   subject: 'Sendgrid test',
   html: 'This is the email body'
};

app.service('mailer').create(email).then(function (result) {
  console.log('Sent email', result);
}).catch(err => {
  console.log(err);
});

For a more complete example, see examples/app which can be run with npm run example.

Changelog

1.0.0

  • Initial release

License

Copyright (c) 2016

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 30 Sep 2016

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