Last active
July 11, 2017 16:25
-
-
Save kseniya292/dbb6681e0cd016c5dfadecb033cf3ebc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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