Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@lu-development/gmwrapper
Advanced tools
This module is a simple wrapper for the Guerillamail API.
Using npm:
$ npm install @lu-development/gmwrapper
establishSession()
function must resolve. Because of the requests to the guerilla mail api, most functions return promises.const {gmSession} = require('@lu-development/gmwrapper')
async function () {
let session = new gmSession()
await session.establishSession()
let inbox = await session.checkEmail()
}
function () {
let session = new gmSession()
session.establishSession().then(() => {
session.checkEmail().then((inbox)=> {
console.log(inbox)
})
});
}
async function () {
let session = new gmSession()
await session.establishSession()
await session.setEmail('newusername')
}
//Optionally usernames can be set in the constructor
async function () {
let session = new gmSession('username')
await session.establishSession()
}
session.establishSession()
This function is required to start the session. Returns the session ID.
session.setEmail(emailUser)
Sets the username for the email. Returns the username.
session.checkEmail()
Checks the inbox for the session. Returns an array of email objects.
session.deleteEmail(email)
Deletes an email from the inbox, and requires the email object as an argument. Returns the response from the endpoint.
session.findEmailBySender(senderAddress[, timeout[, interval]])
Searches the inbox for an email by the sender address. Returns the email object.
session.findEmailBySubject(subject[, timeout[, interval]])
Searches the inbox for an email by the email subject. Returns the email object.
session.fetchEmail(emailID)
Queries for an email based on the email ID. Returns the email object.
session.getEmailAddr()
Returns the actual address for the inbox.
session.getAlias()
Returns an alias to conceal the address for the inbox.
session.getSid()
Returns session ID.
The sending of emails is handled through a seperate object called the gmSender. It can be called like this:
sender.sendEmail(recipient, subject, body)
Sends an email from the session to the recipient.
const {gmSender} = require('@lu-development/gmwrapper')
async function () {
let sender = new gmSender('myemail@gmail.com', 'password')
await sender.sendEmail('otherTestUser@sharklasers.com', 'This is the subject', 'This is the body')
}
FAQs
JS wrapper for the guerrilla mail API
We found that @lu-development/gmwrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.