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.
app-notify
Advanced tools
Send Twilio SMS and SMTP email notifications from within your node.js app
npm install app-notify
const Notify = require('app-notify');
const cfg = {...};
const notify = new Notify(cfg);
const cfg = {};
//setup smtp server
cfg.smtp = {
host: xxx,
user: user,
pass: pass,
port: port
};
//setup email headers
cfg.email = {
to: 'user@example.com',
from: 'sender@example.com'
};
const Notify = require('app-notify');
const notify = new Notify(cfg);
//send an email
notify.email.send({
subject: 'This is a test',
message: 'Hello world!'
})
.then(function(data){
console.log(data);
})
.catch(function(err){
console.error(err);
});
const cfg = {};
//setup sms configuration
cfg.sms = {
sid: 'twilio-sid-id',
auth: 'twilio-auth-id',
to: 'xxx-xxx-xxxx', //recipient
from: 'yyy-yyy-yyyy' //your twilio assigned phone number
};
const Notify = require('app-notify');
const notify = new Notify(cfg);
notify.sms.send({
message: 'Hello world'
})
.then(function(data){
console.log(data);
})
.catch(function(err){
console.error(err);
});
const cfg = {};
//setup smtp server
cfg.smtp = {
host: xxx,
user: user,
pass: pass,
port: port
};
//setup email headers
cfg.email = {
to: 'user@example.com',
from: 'sender@example.com'
};
const Notify = require('app-notify');
const notify = new Notify(cfg);
//sends both
notify.send({
subject: 'This is a test',
message: 'Hello world'
});
//disable email
notify.cfg.email.disabled = true;
//sends only sms
notify.send({
message: 'Hello world',
});
app-notify can be used with callbacks too!
gulp test
FAQs
Send SMS and email notifications from within your node.js app
The npm package app-notify receives a total of 5 weekly downloads. As such, app-notify popularity was classified as not popular.
We found that app-notify 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.