Skip to content

Instantly share code, notes, and snippets.

@skinnyjames
Last active April 24, 2018 14:57
Show Gist options
  • Save skinnyjames/a201f3a4f51c1ec23f0bccdb943e7874 to your computer and use it in GitHub Desktop.
Save skinnyjames/a201f3a4f51c1ec23f0bccdb943e7874 to your computer and use it in GitHub Desktop.
var email = require('email-anonymizer')({
domain: 'xyz.com',
})
email.send({
'from': 'seangregory@protonmail.com',
'to': 'seanchristophergregory@gmail.com',
'body': 'hello world'
})
.then((response) => {
console.log(response)
})
.catch((err) => {
console.error(err)
})
/*
{
id: 'uniqueid',
generatedEmailAddress: 'uniqueid@xyz.com',
success: true,
}
*/
// OR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment