onesecmail-api

1.0.1 • Public • Published

onesecmail-api

Wrapper for 1secmail.com

Table of Contents

Usage

For Node.js

Install using:

npm install onesecmail-api --save

WARNING

this module require nodejs ver ^18.7.0

const onesecmailApi = require('onesecmail-api');

(async () => {
    const { mail, event } = await onesecmailApi()
    console.log(mail)
    event.on('newMsg', console.log)
})()

//Event response ->
{
    id: 10561939,
    sender: 'fazriloke18@gmail.com',
    subject: 'Hello World',
    date: '2023-04-30T04:16:42.000Z',
    msgBody: '<div dir="ltr">Whats up... NodeJS</div>\n',
    msgText: 'Whats up... NodeJS\n',
    attachments: [
        {
            fileName: 'Vector.png',
            fileSize: 207,
            fileContentType: 'image/png',
            fileUrl: 'https://www.1secmail.com/api/v1/?action=download&login=undefined&domain=undefined&id=10561939&file=Vector.png'
        }
    ]
}

/onesecmail-api/

    Package Sidebar

    Install

    npm i onesecmail-api

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    5.83 kB

    Total Files

    6

    Last publish

    Collaborators

    • fzrilsh