
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
mailx is a simple and complete email client library (pop, imap and smtp) for nodejs.
the message object is used to write or read a message.
Sample: write a new message
var message = mailx.message();
message.setFrom('me', 'me@example.net');
message.addTo('you', 'you@example.net');
message.setSubject('hello');
message.setText('hi ! how are u?');
message.setHtml('hi ! how are u? <b>hugs</b>');
the transport objet is used to send a predefined message.
Sample: sending a message
var transport = mailx.transport('smtp.example.net', 25, 'login', 'password');
transport.send(message, function(err,result) {
console.log(result);
});
Store object
Sample: get all messages from server, log their subjets and delete the last one
var store = mailx.store('pop3', 'pop.example.net', 110, 'login', 'password');
store.connect(function(err) {
if (err) {
return console.log('connect error', err);
}
store.getInboxMessages(0, function(err, messages) {
if (err) {
return console.log('inbox error', err);
}
messages.forEach(function(message,index) {
console.log(message.subject);
if (index === messages.length - 1) {
message.delete(function(err, data) {
console.log('message deleted!', data);
store.close(function(err, data) {
console.log('store.close err:', err);
});
});
}
});
});
});
Sample: get message by message from server and log their subjets
var store = mailx.store('imap', 'imap.example.net', 143, 'login', 'password');
store.connect(function(err) {
if (err) {
return console.log('err connect: ', err);
}
var inbox = store.getInbox(1);
inbox.fail(function(err){
console.log('fail get messages: ', err);
});
inbox.done(function(status){
console.log('end of inbox');
});
(function recursiveRcpt() {
inbox.getNextMessage(function(err, message) {
if (err) {
return console.log('fail get message: ', err);
}
if (message === null) {
return console.log('no more message to read');
}
console.log(message.subject);
recursiveRcpt();
});
})();
});
FAQs
simple and complete email client library (pop, imap and smtp) for nodejs
The npm package mailx receives a total of 116 weekly downloads. As such, mailx popularity was classified as not popular.
We found that mailx 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.