Skip to content

Instantly share code, notes, and snippets.

@kseniya292
Last active July 11, 2017 16:25
Show Gist options
  • Save kseniya292/dbb6681e0cd016c5dfadecb033cf3ebc to your computer and use it in GitHub Desktop.
Save kseniya292/dbb6681e0cd016c5dfadecb033cf3ebc to your computer and use it in GitHub Desktop.
module.exports = {
create: function (req, res) {
const email = req.body
sails.hooks.email.send(
"sendEmail",
{
Name: email.name,
},
{
to: email.to,
subject: "Welcome Email"
},
function(err) {
console.log(err || "Mail Sent!");
}
)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment