Skip to content

Instantly share code, notes, and snippets.

@Skyb0rg
Forked from ahmedengu/main.js
Created December 10, 2020 12:20
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 Skyb0rg/302c13554cd52132bc71f5c6976db8a2 to your computer and use it in GitHub Desktop.
Save Skyb0rg/302c13554cd52132bc71f5c6976db8a2 to your computer and use it in GitHub Desktop.
Using simple-parse-smtp-adapter with cloud code, Parse Server, https://github.com/lcortess/simple-parse-smtp-adapter
var sendSmtpMail = require('simple-parse-smtp-adapter')({
fromAddress: 'your@sender.address',
user: 'email@email.com',
password: 'AwesomePassword',
host: 'your.smtp.host',
isSSL: true,
port: 465,
emailField: 'email'
}).sendMail;
Parse.Cloud.afterSave("_User", function (request) {
sendSmtpMail({
to: request.get('email'),
text: 'hi,<br> Message!',
subject: 'subject'
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment