OneSecAPI
NodeJS API for 1secmail.com
Install / Use
/learn @L3afMe/OneSecAPIREADME
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
<details><summary>Methods</summary>
new OneSecMailbox(username: string, domain: string): OneSecMailbox;
Arguments
- Username - The username of the email
- Domain - The email domain (Not including the '@')
- Valid Domains:
1secmail.com1secmail.org1secmail.netwwjmp.comesiix.com
- Valid Domains:
Description
- Initializes a OneSecMailbox object
OneSecMailbox~getMail(): Promise<OneSecMessage[]>
Description
- Fetch list of OneSecMessage
OneSecMailbox.getDomains(): string[]
Description
- Returns list of valid domains
OneSecMessage
<details><summary>Methods</summary>
OneSecMessage~getID(): number
Description
- Returns the 1secMAIL ID
OneSecMessage~getSender(): string
Description
- Returns the mail body
OneSecMessage~getSubject(): string
Description
- Returns the mail plain text body
OneSecMessage~getDate(): Date
Description
- Returns the Date mail was received
OneSecMessage~getAttachments(): OneSecMessageAttachment[]
Description
- Returns a list of attachments
OneSecMessage~getBody(): string
Description
- Returns the mail body
OneSecMessage~getTextBody(): string
Description
- Returns the mail plain text body
OneSecMessage~getHtmlBody(): string
Description
- Returns the mail html body
OneSecMessageAttachment
<details><summary>Methods</summary>OneSecMessageAttachment~getFileName(): string
Description
- Returns the attachment file name
OneSecMessageAttachment~getFileURL(): string
Description
- Returns the attachment download URL
OneSecMessageAttachment~getFileSize(): number
Description
- Returns the attachment file size
OneSecMessageAttachment~getContentType(): string
Description
- Returns the attachment content type
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
