1.0.1 • Published 1 year ago

onesecmail-api v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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'
        }
    ]
}
1.0.1

1 year ago

1.0.0

1 year ago