Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
periodicjs.core.mailer
Advanced tools
Readme
Periodic's Code mailer module exports a single function that asynchronously returns a node mailer transport to send transactional emails with.
$ npm install periodicjs.core.mailer
This is a part of Periodic's core.
JavaScript
var CoreMailer = require('periodicjs.core.mailer'),
sampleemail ={
to: "user@example.com",
cc: "service@example.com",
subject: "sample email test",
generateTextFromHTML: true,
html: "<h1>Welcome User</h1><p>email rocks</p>"
},
emailtransport;
//instance methods
const newCoreMailer = new CoreMailer({
config: {
transportConfig: {
type: 'stub',
transportoptions: {
debug: true,
args: ['-t', '-i']
},
},
},
});
newCoreMailer.sendEmail(sampleemail)
.then(console.log)
.catch(console.error);
//static methods
CoreMailer.sendEmail(sampleemail)
.then(console.log)
.catch(console.error);
//example transports
const sendmailTransportExample = {
"type":"sendmail",
"transportoptions":{
"debug":true,
"args":["-t","-i"]
}
};
const SMTPTransportExample = {
"type":"SMTP",
"transportoptions":{
"service": "SendGrid",
"auth": {
"user": "username",
"pass": "password"
}
}
};
const SESTransportExample = {
"type":"ses",
"transportoptions":{
"accessKeyId": "ACCESSKEYID",
"secretAccessKey": "SECRETACCESSKEY"
}
};
//all types:
const transports = {
ses,
sendmail: sendmailTransport,
'smtp-pool': smtpPool,
sendgrid: sgTransport,
mailgun: mgTransport,
stub: stubTransport,
direct: directTransport,
}
//options.emailtemplatefilepath
CoreMailer.getEmailTemplateHTMLString(options); //Promise.resolve(templateString);
//options.transportObject.transportType, options.transportObject.transportOptions
CoreMailer.getTransport(options); //Promise.resolve(nodemailertransport);
//options.to, options.from, options.html, options.subject, etc
CoreMailer.sendEmail(options); //Promise.resolve(emailstatus);
Make sure you have grunt installed
$ npm install -g grunt-cli
For tests
$ grunt test && grunt coveralls
For generating documentation
$ grunt doc
$ jsdoc2md lib/**/*.js > doc/api.md
FAQs
nodemailer transport loader for periodicjs
The npm package periodicjs.core.mailer receives a total of 2 weekly downloads. As such, periodicjs.core.mailer popularity was classified as not popular.
We found that periodicjs.core.mailer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.