
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
app-notify
Advanced tools
Send SMS and email notifications from within your node.js app
npm install app-notify
var Notify = require('app-notify');
var cfg = {...};
var notify = new Notify(cfg);
Send an email message:
var 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'
};
var Notify = require('app-notify');
var notify = new Notify(cfg);
//send an email
notify.email({
subject: 'This is a test',
message: 'Hello world!'
})
.then(function(data){
console.log(data);
})
.catch(function(err){
console.error(err);
});
Send an SMS message
var 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
};
var Notify = require('app-notify');
var notify = new Notify(cfg);
notify.sms({
message: 'Hello world'
})
.then(function(data){
console.log(data);
})
.catch(function(err){
console.error(err);
});
Send to whichever services we have enabled (both sms and email):
var 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'
};
var Notify = require('app-notify');
var 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 1 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.