OneSecAPI
Installation
Using npm
npm install onesec-api
Using yarn
yarn add onesec-api
Example
npm run test
const { OneSecMailbox } = require("../lib");
const oneSec = new OneSecMailbox("test", "esiix.com");
oneSec.getMail().then((mailbox) => {
mailbox.forEach((msg, i) => {
console.log(
`Email #${i + 1} (of ${mailbox.length})\n` +
` From: ${msg.getSender()}\n` +
` Subject: ${msg.getSubject()}\n` +
` Body: ${msg.getTextBody()}\n` +
` Date: ${msg.getDate()}\n` +
` Attachment Count: ${msg.getAttachments().length}`
);
});
});
Documentation
OneSecMailbox
Methods
new OneSecMailbox(username: string, domain: string): OneSecMailbox;
Arguments
- Username - The username of the email
- Domain - The email domain (Not including the '@')
- Valid Domains:
1secmail.com
1secmail.org
1setmail.net
wwjmp.com
esiix.com
Description
Description
Description
- Returns list of valid domains
OneSecMessage
Methods
Description
Description
Description
- Returns the mail plain text body
Description
- Returns the Date mail was
received
Description
- Returns a list of attachments
Description
Description
- Returns the mail plain text body
Description
- Returns the mail html body
OneSecMessageAttachment
Methods
Description
- Returns the attachment file name
Description
- Returns the attachment download URL
Description
- Returns the attachment file size
Description
- Returns the attachment content type