
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.
email-smtp-cron-delivery
Advanced tools
Appenders and cron settings allows flexible email delivery options
Included appenders:
npm install email-smtp-cron-delivery
Examples
estd = require('email-smtp-cron-delivery')
var email = new estd({smtp_config : {
host: "smtp host goes here",
port: "smtp port goes here",
auth: {
user: "user name here",
pass: "password goes here",
type: "SMTP",
},
secure: ""
},
emailThrottle : {
cronTime: "0,15,30,45 0-59 * * * *" /* This is optional. Cron setting for how often you want emails to be sent. */
}
}).init()
var email_instant = email.appender({type: 'instant'})
email_instant.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This will appear in the email</h2>"
}
})
email_instant.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This is another email</h2>"
}
})
var email_threshold = email.appender({
type: 'threshold',
threshold_number: 1000,
test_as: 'greater_than'
})
email_threshold.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This will appear in the email</h2>"
}
})
var email_escallating = email.appender({
type: 'escallating'
})
email_escallating.add({cron_config : {
cronTime: "0 0-59 * * * *"
}
})
email_escallating.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This is the first email that will appear</h2>"
}
})
email_escallating.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This is the second email that will appear</h2>"
}
})
var email_bundle = t.email.appender({
type: 'bundle'
})
email_bundle.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This is the first email that will appear</h2>"
}
})
email_bundle.add({
email_setup : {
"from": "some email address",
"to": "some email address",
"subject": "try me out",
"html": "<h2>This is the second email that will appear</h2>"
}
})
email_bundle.add({
bundle : {
"html": "<h4>Here is something we need to know</h4>"
}
})
email_bundle.add({
bundle : {
"html": "<h4>Something else</h4>"
}
})
email_bundle.add({
bundle : {
"html": "<h4>Cool</h4>"
}
})
The following examples are various attempts to email:
email_bundle.attempt().on('success', function(){
email_bundle.then('stop').then('reset').then('clear_messages').add({
bundle : {
"html": "<h1>This is a new message</h1>"
}
}).attempt().on('error', function(obj){
console.log('error: ' + obj.message)
})
}).on('error', function(obj){
console.log('error: ' + obj.message)
})
email_instant.attempt().on('success', function(){
email_instant.then('stop').then('reset')
}).on('error', function(){
console.log('error: ' + obj.message)
})
email_escallating.attempt().on('success', function(){
email_escallating.attempt().on('success', function(){
email_escallating.then('stop').then('reset').attempt().on('success', function(){
email_escallating.then('stop').then('reset')
}).on('error', function(){
console.log('error: ' + obj.message)
})
}).on('error', function(){
console.log('error: ' + obj.message)
})
}).on('error', function(){
console.log('error: ' + obj.message)
})
email_threshold.attempt({submit: 1001}).on('success', function(obj){
console.log('threshold debug 10.00')
}).on('error', function(){
console.log('error: ' + obj.message)
})
....
FAQs
send emails via configurable appenders
The npm package email-smtp-cron-delivery receives a total of 5 weekly downloads. As such, email-smtp-cron-delivery popularity was classified as not popular.
We found that email-smtp-cron-delivery 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.