Skip to content

Instantly share code, notes, and snippets.

@ImreC
Last active February 17, 2018 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ImreC/f8523a419db1056ceeb781f0af9d8c55 to your computer and use it in GitHub Desktop.
Save ImreC/f8523a419db1056ceeb781f0af9d8c55 to your computer and use it in GitHub Desktop.
// Initializes the `/mailer` service on path `/mailer`
const hooks = require('./mailer.hooks');
const Mailer = require('feathers-mailer');
const smtpTransport = require('nodemailer-smtp-transport');
module.exports = function (app) {
app.use('/mailer', Mailer(smtpTransport({
host: 'email-smtp.us-east-1.amazonaws.com',
secure: true,
auth: {
user: process.env.SMTP_USER,
pass: process.env.SMTP_PASS
}
})));
const service = app.service('mailer');
service.hooks(hooks);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment