How to use sendemail - 10 common examples

To help you get started, we’ve selected a few sendemail examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FAC-11 / AllAboutMe / src / controllers / finish.js View on Github external
const checkEmail = require('./check_email');
const sendemail = require('sendemail');
const env = require('env2')('config.env');

const email = sendemail.email;
sendemail.set_template_directory('src/email_templates');
const {getForm} = require('../model/form_queries');
const {mergeObj, addData} = require('./helpers.js');

exports.post = (req, res) => {

  getForm(req.session.id)
    .then((data) => {

    const person = {
      name: req.session.user,
      email: req.body.email,
      subject: 'All about me questionnaire'
    };

    const cleanData = mergeObj(data);
    addData(person, cleanData);

sendemail

Simplifies reliably sending emails from your node.js apps!

GPL-2.0
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis