
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@essential-projects/email
Advanced tools
config/ENVIRONMENT/email/email_service.json
and config/ENVIRONMENT/email/email_repository.json
in your project{}
npm install @5minds/email --save
ioc_module.js
const email = require('@5minds/email/ioc_module');
email.registerInContainer(container);
EmailService
into the services that need to send emailService{
host: 'smtp.gmail.com',
port: 465,
username: 'heiko.mathes@5minds.de',
password: '*******************',
}
'*******************'
text
, html
and template
are all optional, but at least one of them has to exist
{
senderName: 'Heiko Mathes',
senderAddress: 'heiko.mathes@gmail.com',
to: ['heiko.mathes@gmail.com'],
subject: 'testMail',
text: 'PlainText',
html: '<b>styledtext</b>'
template: template-object
attachments: attachments-object
},
the template-object can have one ot the following forms
{
path: '/path/to/a/handlebars/file.hbs',
data: {
testText: 'HAI!',
}
}
or
{
source: '<html><body>testText: <b>{{testText}}</b></body></html>',
data: {
testText: 'HAI!',
}
}
or
{
handlebarsTemplate: a_compiled_handlebars_template_object,
data: {
testText: 'HAI!',
}
}
See Nodemailer - Using attachments
this.emailService.sendSMTPMail({
host: 'smtp.gmail.com',
port: 465,
username: 'heiko.mathes@5minds.de',
password: '************************',
}, {
senderName: 'Heiko Mathes',
to: ['heiko.mathes@gmail.com'],
subject: 'testMail',
template: {
path: './testTemplate.hbs',
data: {
testText: 'HAI!',
},
},
});
{
}
{
"overwriteReceiver": "some@mail.address", // optional, overwrites the direct receiver of all mails
"smtp": { // optional, default smtp-settings
"host": "smtp.gmail.com",
"port": 465,
"username": "heiko.mathes@5minds.de",
"password": "*******************"
},
"sendgrid": { // optional, default sendgrid-settings
"APIKey": "*******************"
}
}
FAQs
Service to send mails
The npm package @essential-projects/email receives a total of 3 weekly downloads. As such, @essential-projects/email popularity was classified as not popular.
We found that @essential-projects/email demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.