
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@pubsweet/component-send-email
Advanced tools
In order to configure this component, simply add the path to your mailer
configuration in your app's config
file. For example:
mailer: {
path: `${__dirname}/mailer`,
},
In this case, mailer.js
creates a new AWS.SES
object which will be used to send emails:
const AWS = require('aws-sdk')
const config = require('config')
module.exports = {
transport: {
SES: new AWS.SES({
accessKeyId: config.SES.accessKey,
secretAccessKey: config.SES.secretKey,
region: config.SES.region,
}),
},
}
If you plan on using environment variables for your AWS account, you need to create a config/custom-environment-variables.json
file with the following content:
{
"SES": {
"accessKey": "AWS_SES_ACCESS_KEY",
"secretKey": "AWS_SES_SECRET_KEY",
"region": "AWS_SES_REGION"
}
}
The send-email
component contains a send()
function which takes a single mailData
object which needs to contain at least the following properties: from
, to
, cc
, bcc
, subject
, text
, html
.
It returns the resulting information provided by nodemailer. In most cases, you can just ignore it.
const Email = require('@pubsweet/component-send-email')
const config = require('config')
module.exports = {
setupEmail: async toEmail => {
const mailData = {
from: config.get('mailer.from'),
to: toEmail,
cc: ccEmail,
bcc: bccEmail,
subject: 'You have been invited!',
text: 'This is an email',
html: '<p>This is an email</p>',
}
return Email.send(mailData)
},
}
FAQs
send email configured for pubsweet
The npm package @pubsweet/component-send-email receives a total of 190 weekly downloads. As such, @pubsweet/component-send-email popularity was classified as not popular.
We found that @pubsweet/component-send-email demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.