Skip to content

Instantly share code, notes, and snippets.

@Skyb0rg
Forked from ahmedengu/main.js
Created December 10, 2020 12:20
Show Gist options
  • 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: '[email protected]',
user: '[email protected]',
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