Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
simple-parse-smtp-adapter
Advanced tools
With this adapter you can send email for reset password and email verification in parse with SMTP access and custom templates, I am doing methods for support email verification, and templates for reset password pages :)
Install npm module in your parse server project
$ npm install --save simple-parse-smtp-adapter
In the configuration of your parse server you must pass simple-parse-smtp-adapter
as email adapter and set your SMTP access for send emails also the path to your jade template and its less file.
This is an example using parse server as express module:
"use strict";
const Express = require('express');
const ParseServer = require('parse-server').ParseServer;
const app = Express();
const APP_PORT = 1337;
let api = new ParseServer({
appName: "Parse Test",
appId: "12345",
masterKey: "abcde12345",
serverURL: "http://localhost:1337/parse",
publicServerURL: "http://localhost:1337/parse",
databaseURI: "mongodb://user:pass@host:27017/parse",
port: APP_PORT,
//This is the config for email adapter
emailAdapter: {
module: "simple-parse-smtp-adapter",
options: {
fromAddress: 'your@sender.address',
user: 'email@email.com',
password: 'AwesomePassword',
host: 'your.smtp.host',
isSSL: true, //True or false if you are using ssl
port: 465, //SSL port or another port
name: 'your domain name', // optional, used for identifying to the server
//Somtimes the user email is not in the 'email' field, the email is search first in
//email field, then in username field, if you have the user email in another field
//You can specify here
emailField: 'username',
templates: {
//This template is used only for reset password email
resetPassword: {
//Path to your template
template: __dirname + '/views/email/reset-password',
//Subject for this email
subject: 'Reset your password'
},
verifyEmail: {
template: __dirname + '/views/email/verify-email',
subject: 'Verify Email'
}
}
}
}
});
/**
* Parse Server endpoint
*/
app.use('/parse', api);
app.listen(APP_PORT, function () {
console.log(`Parse Server Ready and listening on port ${APP_PORT}`);
});
The path you pass to the email adapter must be a directory and not a file, this path must contain 2 mandatory files html.jade
and style.less
you can do your template as you like with the CSS rules that emails supports in the template you can use 3 variables:
#{user.get('username')}
This module is pull request friendly in the develop branch feel free of send new features or bug fixes.
If you find a bug please open an issue.
FAQs
Send custom emails from parse with SMTP access
We found that simple-parse-smtp-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.